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

- old
+ new

@@ -22,11 +22,11 @@ model_class = fake(:example_model, as: :class) { ExampleModel1 } factory = ExampleFactory.new(model_class) factory.create(2) - model_class.should have_received.new(1, 2) + expect(model_class).to have_received.new(1, 2) end class ExampleModel2 def initialize(x, y, z) end @@ -47,11 +47,11 @@ it "works with classes with no explicit constructor" do model_class = fake(:example_model, as: :class) { ExampleModel3 } model = model_class.new - model_class.should have_received.new + expect(model_class).to have_received.new end class ExampleModel4 def initialize(y) end @@ -63,11 +63,11 @@ it "allows creating the model instances as usual" do model = fake(:example_model) { ExampleModel4 } model.foo(1) - model.should have_received.foo(1) + expect(model).to have_received.foo(1) end module ExampleModel5 def self.foo(x) end @@ -76,8 +76,8 @@ it "allows creating fakes of modules as usual" do model = fake(:example_model, as: :class) { ExampleModel5 } model.foo(1) - model.should have_received.foo(1) + expect(model).to have_received.foo(1) end end