summaryrefslogtreecommitdiff
path: root/spec/ruby/library/erb/run_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/erb/run_spec.rb')
-rw-r--r--spec/ruby/library/erb/run_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/library/erb/run_spec.rb b/spec/ruby/library/erb/run_spec.rb
index c4b82b155e..d81d534087 100644
--- a/spec/ruby/library/erb/run_spec.rb
+++ b/spec/ruby/library/erb/run_spec.rb
@@ -6,7 +6,7 @@ describe "ERB#run" do
# lambda { ... }.should output
def _steal_stdout
orig = $stdout
- s = ''
+ s = +''
def s.write(arg); self << arg.to_s; end
$stdout = s
begin
@@ -52,9 +52,9 @@ END
it "is not able to h() or u() unless including ERB::Util" do
input = "<%=h '<>' %>"
- lambda {
+ -> {
_steal_stdout { ERB.new(input).run() }
- }.should raise_error(NameError)
+ }.should.raise(NameError)
end
it "is able to h() or u() if ERB::Util is included" do
@@ -89,8 +89,8 @@ END
actual = _steal_stdout { myerb2.new.main1() }
actual.should == expected
- lambda {
+ -> {
_steal_stdout { myerb2.new.main2() }
- }.should raise_error(NameError)
+ }.should.raise(NameError)
end
end