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.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/library/erb/run_spec.rb b/spec/ruby/library/erb/run_spec.rb
index 8c07442d8f..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
@@ -54,7 +54,7 @@ END
input = "<%=h '<>' %>"
-> {
_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
@@ -91,6 +91,6 @@ END
-> {
_steal_stdout { myerb2.new.main2() }
- }.should raise_error(NameError)
+ }.should.raise(NameError)
end
end