From 8a5c130875fe78836b1be4767616ec70f4b97f95 Mon Sep 17 00:00:00 2001 From: wvengen Date: Fri, 27 Oct 2017 23:21:31 +0200 Subject: [PATCH] Bundle update --- Gemfile | 2 +- Gemfile.lock | 81 ++++++++++++++------------- spec/factories/article.rb | 4 +- spec/factories/group_order.rb | 6 +- spec/factories/group_order_article.rb | 4 +- spec/factories/order.rb | 4 +- spec/factories/supplier.rb | 4 +- spec/factories/user.rb | 4 +- spec/integration/articles_spec.rb | 2 +- spec/models/article_spec.rb | 2 +- spec/models/group_order_spec.rb | 4 +- spec/support/factory_girl.rb | 4 +- spec/support/session_helper.rb | 2 +- 13 files changed, 62 insertions(+), 61 deletions(-) diff --git a/Gemfile b/Gemfile index d0ed3fe6..f7fbdaae 100644 --- a/Gemfile +++ b/Gemfile @@ -99,7 +99,7 @@ end group :test do gem 'rspec-rails' - gem 'factory_girl_rails' + gem 'factory_bot_rails' gem 'faker' gem 'capybara' gem 'capybara-webkit' diff --git a/Gemfile.lock b/Gemfile.lock index ad0ac14b..fbbe9a55 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -91,11 +91,11 @@ GEM arel (6.0.4) attribute_normalizer (1.2.0) base32 (0.3.2) - better_errors (2.3.0) + better_errors (2.4.0) coderay (>= 1.0.0) erubi (>= 1.0.0) rack (>= 0.9.0) - binding_of_caller (0.7.2) + binding_of_caller (0.7.3) debug_inspector (>= 0.0.1) bootstrap-datepicker-rails (1.7.1.1) railties (>= 3.0) @@ -147,7 +147,7 @@ GEM thor (~> 0.19.4) tins (~> 1.6) crass (1.0.2) - daemons (1.2.4) + daemons (1.2.5) database_cleaner (1.6.1) date_time_attribute (0.1.2) activesupport (>= 3.0.0) @@ -169,17 +169,17 @@ GEM activesupport (>= 4.0, < 6) execjs (2.7.0) expression_parser (0.9.0) - factory_girl (4.8.1) + factory_bot (4.8.2) activesupport (>= 3.0.0) - factory_girl_rails (4.8.0) - factory_girl (~> 4.8.0) + factory_bot_rails (4.8.2) + factory_bot (~> 4.8.2) railties (>= 3.0.0) faker (1.8.4) i18n (~> 0.5) ffi (1.9.18) gaffe (1.2.0) rails (>= 4.0.0) - globalid (0.4.0) + globalid (0.4.1) activesupport (>= 4.2.0) grease (0.3.1) haml (4.0.7) @@ -199,8 +199,9 @@ GEM nokogiri (>= 1.6.0) ruby_parser (~> 3.5) htmlentities (4.3.4) - i18n (0.8.6) - i18n-js (3.0.1) + i18n (0.9.0) + concurrent-ruby (~> 1.0) + i18n-js (3.0.2) i18n (~> 0.6, >= 0.6.6) i18n-spec (0.6.0) iso @@ -218,18 +219,18 @@ GEM railties (>= 4.2.0) thor (>= 0.14, < 2.0) json (2.1.0) - kaminari (1.0.1) + kaminari (1.1.1) activesupport (>= 4.1.0) - kaminari-actionview (= 1.0.1) - kaminari-activerecord (= 1.0.1) - kaminari-core (= 1.0.1) - kaminari-actionview (1.0.1) + kaminari-actionview (= 1.1.1) + kaminari-activerecord (= 1.1.1) + kaminari-core (= 1.1.1) + kaminari-actionview (1.1.1) actionview - kaminari-core (= 1.0.1) - kaminari-activerecord (1.0.1) + kaminari-core (= 1.1.1) + kaminari-activerecord (1.1.1) activerecord - kaminari-core (= 1.0.1) - kaminari-core (1.0.1) + kaminari-core (= 1.1.1) + kaminari-core (1.1.1) less (2.6.0) commonjs (~> 0.2.7) less-rails (3.0.0) @@ -282,7 +283,7 @@ GEM prawn (>= 1.3.0, < 3.0.0) protected_attributes (1.1.0) activemodel (>= 4.0.1, < 5.0) - pry (0.11.1) + pry (0.11.2) coderay (~> 1.1.0) method_source (~> 0.9.0) pry-rescue (1.4.5) @@ -336,7 +337,7 @@ GEM thor (>= 0.18.1, < 2.0) rainbow (2.2.2) rake - rake (12.1.0) + rake (12.2.1) ransack (1.8.4) actionpack (>= 3.0) activerecord (>= 3.0) @@ -372,29 +373,29 @@ GEM nokogiri roo (>= 2.0.0beta1, < 3) spreadsheet (> 0.9.0) - rspec (3.6.0) - rspec-core (~> 3.6.0) - rspec-expectations (~> 3.6.0) - rspec-mocks (~> 3.6.0) - rspec-core (3.6.0) - rspec-support (~> 3.6.0) - rspec-expectations (3.6.0) + rspec (3.7.0) + rspec-core (~> 3.7.0) + rspec-expectations (~> 3.7.0) + rspec-mocks (~> 3.7.0) + rspec-core (3.7.0) + rspec-support (~> 3.7.0) + rspec-expectations (3.7.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.6.0) - rspec-mocks (3.6.0) + rspec-support (~> 3.7.0) + rspec-mocks (3.7.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.6.0) - rspec-rails (3.6.1) + rspec-support (~> 3.7.0) + rspec-rails (3.7.1) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.6.0) - rspec-expectations (~> 3.6.0) - rspec-mocks (~> 3.6.0) - rspec-support (~> 3.6.0) + rspec-core (~> 3.7.0) + rspec-expectations (~> 3.7.0) + rspec-mocks (~> 3.7.0) + rspec-support (~> 3.7.0) rspec-rerun (1.1.0) rspec (~> 3.0) - rspec-support (3.6.0) + rspec-support (3.7.0) ruby-filemagic (0.7.2) ruby-ole (1.2.12.1) ruby-prof (0.16.2) @@ -402,7 +403,7 @@ GEM ruby_parser (3.10.1) sexp_processor (~> 4.9) rubyzip (1.2.1) - sass (3.5.2) + sass (3.5.3) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) @@ -470,7 +471,7 @@ GEM railties (>= 3.1) twitter-text (1.14.7) unf (~> 0.1.0) - tzinfo (1.2.3) + tzinfo (1.2.4) thread_safe (~> 0.1) uglifier (3.2.0) execjs (>= 0.3.0, < 3) @@ -519,7 +520,7 @@ DEPENDENCIES database_cleaner date_time_attribute exception_notification - factory_girl_rails + factory_bot_rails faker foodsoft_discourse! foodsoft_documents! @@ -578,4 +579,4 @@ DEPENDENCIES whenever BUNDLED WITH - 1.11.2 + 1.15.4 diff --git a/spec/factories/article.rb b/spec/factories/article.rb index f3dfb917..e37ca713 100644 --- a/spec/factories/article.rb +++ b/spec/factories/article.rb @@ -1,6 +1,6 @@ -require 'factory_girl' +require 'factory_bot' -FactoryGirl.define do +FactoryBot.define do factory :_article do unit { Faker::Unit.unit } diff --git a/spec/factories/group_order.rb b/spec/factories/group_order.rb index 1a665ca4..30445b16 100644 --- a/spec/factories/group_order.rb +++ b/spec/factories/group_order.rb @@ -1,10 +1,10 @@ -require 'factory_girl' +require 'factory_bot' -FactoryGirl.define do +FactoryBot.define do # requires order factory :group_order do - ordergroup { create(:user, groups: [FactoryGirl.create(:ordergroup)]).ordergroup } + ordergroup { create(:user, groups: [FactoryBot.create(:ordergroup)]).ordergroup } end end diff --git a/spec/factories/group_order_article.rb b/spec/factories/group_order_article.rb index 8b2982d8..e1c9f6e2 100644 --- a/spec/factories/group_order_article.rb +++ b/spec/factories/group_order_article.rb @@ -1,6 +1,6 @@ -require 'factory_girl' +require 'factory_bot' -FactoryGirl.define do +FactoryBot.define do # requires order_article factory :group_order_article do diff --git a/spec/factories/order.rb b/spec/factories/order.rb index 619ceb8b..1b63744d 100644 --- a/spec/factories/order.rb +++ b/spec/factories/order.rb @@ -1,6 +1,6 @@ -require 'factory_girl' +require 'factory_bot' -FactoryGirl.define do +FactoryBot.define do factory :order do starts { Time.now } diff --git a/spec/factories/supplier.rb b/spec/factories/supplier.rb index 761db9c3..27b4f414 100644 --- a/spec/factories/supplier.rb +++ b/spec/factories/supplier.rb @@ -1,6 +1,6 @@ -require 'factory_girl' +require 'factory_bot' -FactoryGirl.define do +FactoryBot.define do factory :supplier do name { Faker::Company.name.truncate(30) } diff --git a/spec/factories/user.rb b/spec/factories/user.rb index f70c48c8..bf21a9e0 100644 --- a/spec/factories/user.rb +++ b/spec/factories/user.rb @@ -1,6 +1,6 @@ -require 'factory_girl' +require 'factory_bot' -FactoryGirl.define do +FactoryBot.define do factory :user do sequence(:nick) { |n| "user#{n}"} diff --git a/spec/integration/articles_spec.rb b/spec/integration/articles_spec.rb index 558771bd..40b3a1aa 100644 --- a/spec/integration/articles_spec.rb +++ b/spec/integration/articles_spec.rb @@ -18,7 +18,7 @@ feature ArticlesController do it 'can create a new article' do click_on I18n.t('articles.index.new') expect(page).to have_selector('form#new_article') - article = FactoryGirl.build :article, supplier: supplier, article_category: article_category + article = FactoryBot.build :article, supplier: supplier, article_category: article_category within('#new_article') do fill_in 'article_name', :with => article.name fill_in 'article_unit', :with => article.unit diff --git a/spec/models/article_spec.rb b/spec/models/article_spec.rb index b2a0ef6d..58453a6a 100644 --- a/spec/models/article_spec.rb +++ b/spec/models/article_spec.rb @@ -5,7 +5,7 @@ describe Article do let(:article) { create :article, supplier: supplier } it 'has a unique name' do - article2 = FactoryGirl.build :article, supplier: supplier, name: article.name + article2 = FactoryBot.build :article, supplier: supplier, name: article.name expect(article2).to be_invalid end diff --git a/spec/models/group_order_spec.rb b/spec/models/group_order_spec.rb index 1dab91ed..d715931c 100644 --- a/spec/models/group_order_spec.rb +++ b/spec/models/group_order_spec.rb @@ -7,11 +7,11 @@ describe GroupOrder do # the following two tests are currently disabled - https://github.com/foodcoops/foodsoft/issues/158 #it 'needs an order' do - # expect(FactoryGirl.build(:group_order, ordergroup: user.ordergroup)).to be_invalid + # expect(FactoryBot.build(:group_order, ordergroup: user.ordergroup)).to be_invalid #end #it 'needs an ordergroup' do - # expect(FactoryGirl.build(:group_order, order: order)).to be_invalid + # expect(FactoryBot.build(:group_order, order: order)).to be_invalid #end describe do diff --git a/spec/support/factory_girl.rb b/spec/support/factory_girl.rb index 34b6e657..2cb72940 100644 --- a/spec/support/factory_girl.rb +++ b/spec/support/factory_girl.rb @@ -1,4 +1,4 @@ RSpec.configure do |config| - # load FactoryGirl shortcuts create(), etc. - config.include FactoryGirl::Syntax::Methods + # load FactoryBot shortcuts create(), etc. + config.include FactoryBot::Syntax::Methods end \ No newline at end of file diff --git a/spec/support/session_helper.rb b/spec/support/session_helper.rb index dcfddeac..b832e772 100644 --- a/spec/support/session_helper.rb +++ b/spec/support/session_helper.rb @@ -3,7 +3,7 @@ module SessionHelper def login(user=nil, password=nil) visit login_path - user = FactoryGirl.create :user if user.nil? + user = FactoryBot.create :user if user.nil? if user.instance_of? ::User nick, password = user.nick, user.password else