Skip to content
Browse files

Stub update_column to raise, which will replace update_attribute in R…

…ails 4
  • Loading branch information...
1 parent 9a27bd5 commit 37fe26315e223da0cbceecb5ab091511ef1b02c2 @joshuaclayton joshuaclayton committed Aug 2, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/factory_girl/strategy/stub.rb
View
4 lib/factory_girl/strategy/stub.rb
@@ -51,6 +51,10 @@ def reload
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

0 comments on commit 37fe263

Please sign in to comment.
Something went wrong with that request. Please try again.