1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00

Stub update_column to raise, which will replace update_attribute in Rails 4

This commit is contained in:
Joshua Clayton 2012-08-02 11:06:18 -04:00
parent 9a27bd5289
commit 37fe26315e

View file

@ -51,6 +51,10 @@ module FactoryGirl
def update_attribute(*args)
raise 'stubbed models are not allowed to access the database'
end
def update_column(*args)
raise 'stubbed models are not allowed to access the database'
end
end
created_at_missing_default = result_instance.respond_to?(:created_at) && !result_instance.created_at