From 519d1e1fea4d5e4af136710500fdf6ad26c61b10 Mon Sep 17 00:00:00 2001 From: Grey Baker Date: Fri, 24 Aug 2018 22:28:26 +0100 Subject: [PATCH] Bump factorybot rails (#475) * Bump factory_bot_rails from 4.10.0 to 4.11.0 Bumps [factory_bot_rails](https://github.com/thoughtbot/factory_bot_rails) from 4.10.0 to 4.11.0. - [Release notes](https://github.com/thoughtbot/factory_bot_rails/releases) - [Changelog](https://github.com/thoughtbot/factory_bot_rails/blob/master/NEWS) - [Commits](https://github.com/thoughtbot/factory_bot_rails/compare/v4.10.0...v4.11.0) Signed-off-by: dependabot[bot] * Update factories to always use blocks --- Gemfile | 2 +- Gemfile.lock | 20 ++++++++++---------- spec/factories/articles.rb | 24 ++++++++++++------------ spec/factories/badge_achievements.rb | 2 +- spec/factories/blocks.rb | 2 +- spec/factories/broadcasts.rb | 10 +++++----- spec/factories/chat_channels.rb | 4 ++-- spec/factories/comments.rb | 2 +- spec/factories/display_ads.rb | 4 ++-- spec/factories/events.rb | 2 +- spec/factories/feedback_messages.rb | 16 ++++++++-------- spec/factories/github_repos.rb | 4 ++-- spec/factories/identities.rb | 2 +- spec/factories/mentions.rb | 2 +- spec/factories/notifications.rb | 2 +- spec/factories/reactions.rb | 4 ++-- spec/factories/tags.rb | 2 +- spec/factories/users.rb | 6 +++--- 18 files changed, 55 insertions(+), 55 deletions(-) diff --git a/Gemfile b/Gemfile index 1b0bdb00f..842a8e4e7 100644 --- a/Gemfile +++ b/Gemfile @@ -132,7 +132,7 @@ group :test do gem "approvals", "~> 0.0" gem "chromedriver-helper", "~> 1.2" gem "database_cleaner", "~> 1.7" - gem "factory_bot_rails", "~> 4.10" + gem "factory_bot_rails", "~> 4.11" gem "fake_stripe", "~> 0.1" gem "launchy", "~> 2.4" gem "pundit-matchers", "~> 1.6" diff --git a/Gemfile.lock b/Gemfile.lock index d10017f6f..bd2f6a94a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -263,10 +263,10 @@ GEM eventmachine (1.2.5) excon (0.60.0) execjs (2.7.0) - factory_bot (4.10.0) + factory_bot (4.11.0) activesupport (>= 3.0.0) - factory_bot_rails (4.10.0) - factory_bot (~> 4.10.0) + factory_bot_rails (4.11.0) + factory_bot (~> 4.11.0) railties (>= 3.0.0) fake_stripe (0.1.0) capybara @@ -499,7 +499,7 @@ GEM httparty (0.16.0) multi_xml (>= 0.5.2) httpclient (2.8.3) - i18n (1.0.1) + i18n (1.1.0) concurrent-ruby (~> 1.0) ice_nine (0.11.2) inflecto (0.0.2) @@ -643,7 +643,7 @@ GEM rack rack-proxy (0.6.4) rack - rack-test (1.0.0) + rack-test (1.1.0) rack (>= 1.0, < 3) rack-timeout (0.5.1) rails (5.1.6) @@ -740,10 +740,10 @@ GEM rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) - rubocop-rspec (1.27.0) - rubocop (>= 0.56.0) + rubocop-rspec (1.28.0) + rubocop (>= 0.58.0) ruby-prof (0.17.0) - ruby-progressbar (1.9.0) + ruby-progressbar (1.10.0) ruby_dep (1.5.0) rubyzip (1.2.1) s3_direct_upload (0.1.7) @@ -946,7 +946,7 @@ DEPENDENCIES draper (~> 3.0) email_validator (~> 1.6) envied (~> 0.9) - factory_bot_rails (~> 4.10) + factory_bot_rails (~> 4.11) fake_stripe (~> 0.1) faker! fastly (~> 1.13) @@ -1043,4 +1043,4 @@ RUBY VERSION ruby 2.5.1p57 BUNDLED WITH - 1.16.3 + 1.16.4 diff --git a/spec/factories/articles.rb b/spec/factories/articles.rb index ac39cf116..165e9367c 100644 --- a/spec/factories/articles.rb +++ b/spec/factories/articles.rb @@ -1,22 +1,22 @@ FactoryBot.define do factory :article do transient do - title Faker::Book.title - published true - date "01/01/2015" - tags Faker::Hipster.words(4).join(", ") - canonical_url Faker::Internet.url - with_canonical_url false - with_date false - with_tags true - with_hr_issue false - with_tweet_tag false - with_title true + title { Faker::Book.title } + published { true } + date { "01/01/2015" } + tags { Faker::Hipster.words(4).join(", ") } + canonical_url { Faker::Internet.url } + with_canonical_url { false } + with_date { false } + with_tags { true } + with_hr_issue { false } + with_tweet_tag { false } + with_title { true } end user description { Faker::Hipster.paragraph(1)[0..100] } main_image { Faker::Avatar.image } - language "en" + language { "en" } body_markdown do <<~HEREDOC --- diff --git a/spec/factories/badge_achievements.rb b/spec/factories/badge_achievements.rb index ac1bd5d23..f4b867852 100644 --- a/spec/factories/badge_achievements.rb +++ b/spec/factories/badge_achievements.rb @@ -3,6 +3,6 @@ FactoryBot.define do user badge rewarder { user } - rewarding_context_message_markdown "Hello [Yoho](/hey)" + rewarding_context_message_markdown { "Hello [Yoho](/hey)" } end end diff --git a/spec/factories/blocks.rb b/spec/factories/blocks.rb index f8df14567..a4fa842bc 100644 --- a/spec/factories/blocks.rb +++ b/spec/factories/blocks.rb @@ -1,7 +1,7 @@ FactoryBot.define do factory :block do input_html { Faker::Hipster.paragraph(1) } - input_css "body {color:red}" + input_css { "body {color:red}" } input_javascript { Faker::Hipster.paragraph(1) } end end diff --git a/spec/factories/broadcasts.rb b/spec/factories/broadcasts.rb index 8a56a6bc1..067a909a6 100644 --- a/spec/factories/broadcasts.rb +++ b/spec/factories/broadcasts.rb @@ -1,15 +1,15 @@ FactoryBot.define do factory :broadcast do - sent false + sent { false } end trait :onboarding do - title "Welcome Notification" - type_of "Onboarding" - processed_html "Welcome! Introduce yourself in our welcome thread!" + title { "Welcome Notification" } + type_of { "Onboarding" } + processed_html { "Welcome! Introduce yourself in our welcome thread!" } end trait :sent do - sent true + sent { true } end end diff --git a/spec/factories/chat_channels.rb b/spec/factories/chat_channels.rb index 09abd5380..90ca9859c 100644 --- a/spec/factories/chat_channels.rb +++ b/spec/factories/chat_channels.rb @@ -1,10 +1,10 @@ FactoryBot.define do factory :chat_channel do - channel_type "open" + channel_type { "open" } slug { rand(10000000000).to_s } end trait :workshop do - channel_name "Workshop" + channel_name { "Workshop" } end end diff --git a/spec/factories/comments.rb b/spec/factories/comments.rb index 3e249d8f4..888b54b3f 100644 --- a/spec/factories/comments.rb +++ b/spec/factories/comments.rb @@ -3,6 +3,6 @@ FactoryBot.define do user body_markdown { Faker::Hipster.paragraph(1) } commentable_id { rand(1000) } - commentable_type "Article" + commentable_type { "Article" } end end diff --git a/spec/factories/display_ads.rb b/spec/factories/display_ads.rb index d390c0965..56e989d50 100644 --- a/spec/factories/display_ads.rb +++ b/spec/factories/display_ads.rb @@ -1,6 +1,6 @@ FactoryBot.define do factory :display_ad do - placement_area "sidebar" - body_markdown "Hello _hey_ Hey hey" + placement_area { "sidebar" } + body_markdown { "Hello _hey_ Hey hey" } end end diff --git a/spec/factories/events.rb b/spec/factories/events.rb index a687aeaaa..0a3a0156d 100644 --- a/spec/factories/events.rb +++ b/spec/factories/events.rb @@ -4,6 +4,6 @@ FactoryBot.define do description_markdown { Faker::Hipster.paragraph(2) } starts_at { Time.now } ends_at { Time.now + 3660 } - category "AMA" + category { "AMA" } end end diff --git a/spec/factories/feedback_messages.rb b/spec/factories/feedback_messages.rb index dd3adfd02..d65c170a3 100644 --- a/spec/factories/feedback_messages.rb +++ b/spec/factories/feedback_messages.rb @@ -1,7 +1,7 @@ FactoryBot.define do factory :feedback_message do transient do - reporter_id 1 + reporter_id { 1 } end after(:create) do |feedback_message, evaluator| @@ -10,15 +10,15 @@ FactoryBot.define do end trait :abuse_report do - feedback_type "abuse-reports" - message "this is spam" - category "spam" - reported_url "https://dev.to" + feedback_type { "abuse-reports" } + message { "this is spam" } + category { "spam" } + reported_url { "https://dev.to" } end trait :bug_report do - feedback_type "bug-reports" - message "i clicked something and this happened" - category "bugs" + feedback_type { "bug-reports" } + message { "i clicked something and this happened" } + category { "bugs" } end end diff --git a/spec/factories/github_repos.rb b/spec/factories/github_repos.rb index f32a87423..7de611942 100644 --- a/spec/factories/github_repos.rb +++ b/spec/factories/github_repos.rb @@ -9,7 +9,7 @@ FactoryBot.define do watchers_count { rand(100000) } github_id_code { rand(100000) } stargazers_count { rand(100000) } - featured true - fork false + featured { true } + fork { false } end end diff --git a/spec/factories/identities.rb b/spec/factories/identities.rb index f67f79f0d..5ed2b8f11 100644 --- a/spec/factories/identities.rb +++ b/spec/factories/identities.rb @@ -1,6 +1,6 @@ FactoryBot.define do factory :identity do - provider "github" + provider { "github" } uid { rand(100000) } token { rand(100000) } secret { rand(100000) } diff --git a/spec/factories/mentions.rb b/spec/factories/mentions.rb index 9bf23a642..9151bf69c 100644 --- a/spec/factories/mentions.rb +++ b/spec/factories/mentions.rb @@ -2,6 +2,6 @@ FactoryBot.define do factory :mention do user mentionable_id { rand(1000) } - mentionable_type "Comment" + mentionable_type { "Comment" } end end diff --git a/spec/factories/notifications.rb b/spec/factories/notifications.rb index 3bc74979a..1ed677324 100644 --- a/spec/factories/notifications.rb +++ b/spec/factories/notifications.rb @@ -1,5 +1,5 @@ FactoryBot.define do factory :notification do - sent false + sent { false } end end diff --git a/spec/factories/reactions.rb b/spec/factories/reactions.rb index 1428415b7..5991a3f33 100644 --- a/spec/factories/reactions.rb +++ b/spec/factories/reactions.rb @@ -2,7 +2,7 @@ FactoryBot.define do factory :reaction do reactable_id { rand(10000) } user_id { rand(10000) } - reactable_type "Article" - category "like" + reactable_type { "Article" } + category { "like" } end end diff --git a/spec/factories/tags.rb b/spec/factories/tags.rb index 1042265ba..972e37d08 100644 --- a/spec/factories/tags.rb +++ b/spec/factories/tags.rb @@ -1,6 +1,6 @@ FactoryBot.define do factory :tag do name { rand(10000).to_s } - supported true + supported { true } end end diff --git a/spec/factories/users.rb b/spec/factories/users.rb index ed32f87f6..7a9528ebe 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -18,9 +18,9 @@ FactoryBot.define do summary { Faker::Lorem.paragraph[0..rand(190)] } website_url { Faker::Internet.url } confirmed_at { Time.now } - saw_onboarding true - signup_cta_variant "navbar_basic" - email_digest_periodic false + saw_onboarding { true } + signup_cta_variant { "navbar_basic" } + email_digest_periodic { false } trait :super_admin do after(:build) { |user| user.add_role(:super_admin) }