spec/bogus/fakes/fakes_classes_spec.rb in bogus-0.1.4 vs spec/bogus/fakes/fakes_classes_spec.rb in bogus-0.1.5
- old
+ new
@@ -18,29 +18,29 @@
end
it "creates a fake named after the class" do
fakes_classes.fake(Samples::WillBeOverwritten, foo: "bar")
- creates_fakes_with_stubbed_methods.should have_created(:will_be_overwritten,
+ expect(creates_fakes_with_stubbed_methods).to have_created(:will_be_overwritten,
{as: :class, foo: "bar"}, Samples::WillBeOverwritten)
end
it "overwrites the class with the fake" do
fake = [:will_be_overwritten, {as: :class}, Samples::WillBeOverwritten]
fakes_classes.fake(Samples::WillBeOverwritten)
- overwrites_classes.should have_received.overwrite("Samples::WillBeOverwritten", fake)
+ expect(overwrites_classes).to have_received.overwrite("Samples::WillBeOverwritten", fake)
end
it "stores the overwritten class so that it can be replaced back later" do
fakes_classes.fake(Samples::WillBeOverwritten)
- overwritten_classes.should have_received.add("Samples::WillBeOverwritten", Samples::WillBeOverwritten)
+ expect(overwritten_classes).to have_received.add("Samples::WillBeOverwritten", Samples::WillBeOverwritten)
end
it "uses the passed fake name if provided" do
fakes_classes.fake(Samples::WillBeOverwritten, fake_name: :foo_bar)
- creates_fakes_with_stubbed_methods.should have_created(:foo_bar, {as: :class}, Samples::WillBeOverwritten)
+ expect(creates_fakes_with_stubbed_methods).to have_created(:foo_bar, {as: :class}, Samples::WillBeOverwritten)
end
end