spec/bogus/fakes/class_methods_spec.rb in bogus-0.1.4 vs spec/bogus/fakes/class_methods_spec.rb in bogus-0.1.5

- old
+ new

@@ -20,31 +20,30 @@ end let(:class_methods) { ClassMethods.new(SampleClass) } it "lists the class methods excluding the ones added by Bogus" do - class_methods.all.should =~ [:bar, :hello] + expect(class_methods.all).to match_array([:bar, :hello]) end it "returns the instance methods by name" do - class_methods.get(:bar).should == - SampleClass.method(:bar) + expect(class_methods.get(:bar)).to eq SampleClass.method(:bar) end it "removes methods by name" do class_methods.remove(:hello) - SampleClass.should_not respond_to(:hello) + expect(SampleClass).to_not respond_to(:hello) end it "defines instance methods" do class_methods.define <<-EOF def greet(name) return "Hello, " + name + "!" end EOF - SampleClass.greet("Joe").should == "Hello, Joe!" + expect(SampleClass.greet("Joe")).to eq "Hello, Joe!" end end end