summaryrefslogtreecommitdiff
path: root/spec/ruby/library/weakref/send_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/weakref/send_spec.rb')
-rw-r--r--spec/ruby/library/weakref/send_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/library/weakref/send_spec.rb b/spec/ruby/library/weakref/send_spec.rb
index 173e1055dd..da8660066f 100644
--- a/spec/ruby/library/weakref/send_spec.rb
+++ b/spec/ruby/library/weakref/send_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
require 'weakref'
describe "WeakRef#__send__" do
@@ -27,11 +27,11 @@ describe "WeakRef#__send__" do
it "delegates to protected methods of the weakly-referenced object" do
wr = WeakRef.new(WeakRefSpecs)
- lambda { wr.protected_method }.should raise_error(NameError)
+ -> { wr.protected_method }.should.raise(NameError)
end
it "does not delegate to private methods of the weakly-referenced object" do
wr = WeakRef.new(WeakRefSpecs)
- lambda { wr.private_method }.should raise_error(NameError)
+ -> { wr.private_method }.should.raise(NameError)
end
end