summaryrefslogtreecommitdiff
path: root/test/support/stub_record_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/support/stub_record_helper.rb')
-rw-r--r--test/support/stub_record_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/support/stub_record_helper.rb b/test/support/stub_record_helper.rb
index 25138a0..4d74f2a 100644
--- a/test/support/stub_record_helper.rb
+++ b/test/support/stub_record_helper.rb
@@ -26,7 +26,7 @@ module StubRecordHelper
if record_or_method_hash && !record_or_method_hash.is_a?(Hash)
return record_or_method_hash
end
- FactoryGirl.build_stubbed(factory).tap do |record|
+ FactoryBot.build_stubbed(factory).tap do |record|
if persisted or record.persisted?
record_or_method_hash.reverse_merge! :created_at => Time.now,
:updated_at => Time.now, :id => Random.rand(100000).to_s
@@ -38,7 +38,7 @@ module StubRecordHelper
# returns deep stringified attributes so they can be compared to
# what the controller receives as params
def record_attributes_for(factory, attribs_hash = nil)
- FactoryGirl.attributes_for(factory, attribs_hash).tap do |attribs|
+ FactoryBot.attributes_for(factory, attribs_hash).tap do |attribs|
attribs.keys.each do |key|
val = attribs.delete(key)
attribs[key.to_s] = val.is_a?(Hash) ? val.stringify_keys! : val