summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfastjames <fastjames@gmail.com>2018-07-31 13:51:35 -0500
committerfastjames <fastjames@gmail.com>2018-07-31 13:51:35 -0500
commit18c9df7059af82d9e093ded162a3ddec86748e32 (patch)
tree515b6953415ded98191d0c7f7bfa09d7086f7fa9
parentb56c2829b4c4d4704b2d4ba803215b2c5a330e33 (diff)
Update factory_girl to factory_bot
-rw-r--r--lib/solidus_subscriptions/testing_support/factories.rb2
-rw-r--r--lib/solidus_subscriptions/testing_support/factories/installment_detail_factory.rb2
-rw-r--r--lib/solidus_subscriptions/testing_support/factories/installment_factory.rb2
-rw-r--r--lib/solidus_subscriptions/testing_support/factories/line_item_factory.rb2
-rw-r--r--lib/solidus_subscriptions/testing_support/factories/spree/line_item_factory.rb2
-rw-r--r--lib/solidus_subscriptions/testing_support/factories/spree/order_factory.rb2
-rw-r--r--lib/solidus_subscriptions/testing_support/factories/spree_modification_factory.rb2
-rw-r--r--lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb2
-rw-r--r--solidus_subscriptions.gemspec2
-rw-r--r--spec/spec_helper.rb2
10 files changed, 10 insertions, 10 deletions
diff --git a/lib/solidus_subscriptions/testing_support/factories.rb b/lib/solidus_subscriptions/testing_support/factories.rb
index 6cafa63..8423e0d 100644
--- a/lib/solidus_subscriptions/testing_support/factories.rb
+++ b/lib/solidus_subscriptions/testing_support/factories.rb
@@ -1,4 +1,4 @@
-require 'factory_girl'
+require 'factory_bot'
require 'spree/testing_support/factories'
factory_path = "#{File.dirname(__FILE__)}/factories/**/*_factory.rb"
diff --git a/lib/solidus_subscriptions/testing_support/factories/installment_detail_factory.rb b/lib/solidus_subscriptions/testing_support/factories/installment_detail_factory.rb
index 26eb087..9e1cce5 100644
--- a/lib/solidus_subscriptions/testing_support/factories/installment_detail_factory.rb
+++ b/lib/solidus_subscriptions/testing_support/factories/installment_detail_factory.rb
@@ -1,4 +1,4 @@
-FactoryGirl.define do
+FactoryBot.define do
factory :installment_detail, class: 'SolidusSubscriptions::InstallmentDetail' do
installment
diff --git a/lib/solidus_subscriptions/testing_support/factories/installment_factory.rb b/lib/solidus_subscriptions/testing_support/factories/installment_factory.rb
index 281326e..0bca0bc 100644
--- a/lib/solidus_subscriptions/testing_support/factories/installment_factory.rb
+++ b/lib/solidus_subscriptions/testing_support/factories/installment_factory.rb
@@ -1,4 +1,4 @@
-FactoryGirl.define do
+FactoryBot.define do
factory :installment, class: 'SolidusSubscriptions::Installment' do
transient { subscription_traits [] }
subscription { build :subscription, :with_line_item, *subscription_traits }
diff --git a/lib/solidus_subscriptions/testing_support/factories/line_item_factory.rb b/lib/solidus_subscriptions/testing_support/factories/line_item_factory.rb
index b2ae3c4..a3379a0 100644
--- a/lib/solidus_subscriptions/testing_support/factories/line_item_factory.rb
+++ b/lib/solidus_subscriptions/testing_support/factories/line_item_factory.rb
@@ -1,4 +1,4 @@
-FactoryGirl.define do
+FactoryBot.define do
factory :subscription_line_item, class: 'SolidusSubscriptions::LineItem' do
subscribable_id { create(:variant, subscribable: true).id }
quantity 1
diff --git a/lib/solidus_subscriptions/testing_support/factories/spree/line_item_factory.rb b/lib/solidus_subscriptions/testing_support/factories/spree/line_item_factory.rb
index afa6588..35cf903 100644
--- a/lib/solidus_subscriptions/testing_support/factories/spree/line_item_factory.rb
+++ b/lib/solidus_subscriptions/testing_support/factories/spree/line_item_factory.rb
@@ -1,4 +1,4 @@
-FactoryGirl.modify do
+FactoryBot.modify do
factory :line_item do
trait :with_subscription_line_items do
transient do
diff --git a/lib/solidus_subscriptions/testing_support/factories/spree/order_factory.rb b/lib/solidus_subscriptions/testing_support/factories/spree/order_factory.rb
index a2ce307..03996fd 100644
--- a/lib/solidus_subscriptions/testing_support/factories/spree/order_factory.rb
+++ b/lib/solidus_subscriptions/testing_support/factories/spree/order_factory.rb
@@ -1,4 +1,4 @@
-FactoryGirl.modify do
+FactoryBot.modify do
factory :order do
trait :with_subscription_line_items do
transient do
diff --git a/lib/solidus_subscriptions/testing_support/factories/spree_modification_factory.rb b/lib/solidus_subscriptions/testing_support/factories/spree_modification_factory.rb
index 41e3d69..39e0e46 100644
--- a/lib/solidus_subscriptions/testing_support/factories/spree_modification_factory.rb
+++ b/lib/solidus_subscriptions/testing_support/factories/spree_modification_factory.rb
@@ -1,4 +1,4 @@
-FactoryGirl.modify do
+FactoryBot.modify do
factory :user do
trait :subscription_user do
bill_address
diff --git a/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb b/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb
index 036b4c2..ef31151 100644
--- a/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb
+++ b/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb
@@ -1,4 +1,4 @@
-FactoryGirl.define do
+FactoryBot.define do
factory :subscription, class: 'SolidusSubscriptions::Subscription' do
store
interval_length 1
diff --git a/solidus_subscriptions.gemspec b/solidus_subscriptions.gemspec
index 51154ab..509167c 100644
--- a/solidus_subscriptions.gemspec
+++ b/solidus_subscriptions.gemspec
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'capybara'
s.add_development_dependency 'coffee-rails'
s.add_development_dependency 'database_cleaner'
- s.add_development_dependency 'factory_girl'
+ s.add_development_dependency 'factory_bot'
s.add_development_dependency 'poltergeist'
s.add_development_dependency 'pry'
s.add_development_dependency 'rspec'
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 30eb873..ae3cfdb 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,7 +1,7 @@
Dir[File.join(File.dirname(__FILE__), 'helpers/**/*.rb')].each { |f| require f }
RSpec.configure do |config|
- config.include FactoryGirl::Syntax::Methods
+ config.include FactoryBot::Syntax::Methods
# Infer an example group's spec type from the file location.
config.infer_spec_type_from_file_location!