diff options
Diffstat (limited to 'spec/ruby/core/kernel/binding_spec.rb')
| -rw-r--r-- | spec/ruby/core/kernel/binding_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/kernel/binding_spec.rb b/spec/ruby/core/kernel/binding_spec.rb index 0b33c86d3c..6f27b26f37 100644 --- a/spec/ruby/core/kernel/binding_spec.rb +++ b/spec/ruby/core/kernel/binding_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../fixtures/classes', __FILE__) +require_relative '../../spec_helper' +require_relative 'fixtures/classes' describe "Kernel.binding" do it "returns a binding for the caller" do @@ -9,7 +9,7 @@ end describe "Kernel#binding" do it "is a private method" do - Kernel.should have_private_instance_method(:binding) + Kernel.private_instance_methods(false).should.include?(:binding) end before :each do @@ -35,7 +35,7 @@ describe "Kernel#binding" do end it "raises a NameError on undefined variable" do - lambda { eval("a_fake_variable", @b1) }.should raise_error(NameError) + -> { eval("a_fake_variable", @b1) }.should.raise(NameError) end it "uses the closure's self as self in the binding" do |
