diff options
Diffstat (limited to 'spec/ruby/core/kernel/instance_of_spec.rb')
| -rw-r--r-- | spec/ruby/core/kernel/instance_of_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/core/kernel/instance_of_spec.rb b/spec/ruby/core/kernel/instance_of_spec.rb index 4801a1ff96..8d19974aa3 100644 --- a/spec/ruby/core/kernel/instance_of_spec.rb +++ b/spec/ruby/core/kernel/instance_of_spec.rb @@ -1,7 +1,7 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../fixtures/classes', __FILE__) +require_relative '../../spec_helper' +require_relative 'fixtures/classes' -describe Kernel, "#instance_of?" do +describe "Kernel#instance_of?" do before :each do @o = KernelSpecs::InstanceClass.new end @@ -33,8 +33,8 @@ describe Kernel, "#instance_of?" do end it "raises a TypeError if given an object that is not a Class nor a Module" do - lambda { @o.instance_of?(Object.new) }.should raise_error(TypeError) - lambda { @o.instance_of?('KernelSpecs::InstanceClass') }.should raise_error(TypeError) - lambda { @o.instance_of?(1) }.should raise_error(TypeError) + -> { @o.instance_of?(Object.new) }.should.raise(TypeError) + -> { @o.instance_of?('KernelSpecs::InstanceClass') }.should.raise(TypeError) + -> { @o.instance_of?(1) }.should.raise(TypeError) end end |
