spec/bogus/fakes/instance_methods_spec.rb in bogus-0.1.4 vs spec/bogus/fakes/instance_methods_spec.rb in bogus-0.1.5
- old
+ new
@@ -14,22 +14,22 @@
end
let(:instance_methods) { InstanceMethods.new(SampleClass) }
it "lists the instance methods" do
- instance_methods.all.should =~ [:foo, :hello]
+ expect(instance_methods.all).to match_array([:foo, :hello])
end
it "returns the instance methods by name" do
- instance_methods.get(:foo).should ==
- SampleClass.instance_method(:foo)
+ expect(instance_methods.get(:foo)).to eq(
+ SampleClass.instance_method(:foo))
end
it "removes methods by name" do
instance_methods.remove(:hello)
- SampleClass.new.should_not respond_to(:hello)
+ expect(SampleClass.new).to_not respond_to(:hello)
end
it "defines instance methods" do
instance_methods.define <<-EOF
def greet(name)
@@ -37,9 +37,9 @@
end
EOF
instance = SampleClass.new
- instance.greet("Joe").should == "Hello, Joe!"
+ expect(instance.greet("Joe")).to eq "Hello, Joe!"
end
end
end