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:
parent
9a27bd5289
commit
37fe26315e
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue