Skip to content

Commit

Permalink
Remove noise from rspec run output
Browse files Browse the repository at this point in the history
  • Loading branch information
jpslav committed Sep 15, 2019
1 parent 40b3909 commit 07645d1
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ gem 'oj_mimic_json'
# Admin toggles
gem 'rails-settings-ui'
gem 'rails-settings-cached', '0.7.2'
gem 'dry-validation', '0.12.0'
gem 'dry-validation', '0.12.3'

gem 'scout_apm', '~> 3.0.x'

Expand Down
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ GEM
ast (2.4.0)
autoprefixer-rails (9.6.0)
execjs
awesome_print (1.7.0)
awesome_print (1.8.0)
aws-ses (0.6.0)
builder
mail (> 2.2.5)
Expand Down Expand Up @@ -179,12 +179,12 @@ GEM
dry-container (0.7.2)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.1, >= 0.1.3)
dry-core (0.4.8)
dry-core (0.4.9)
concurrent-ruby (~> 1.0)
dry-equalizer (0.2.2)
dry-inflector (0.1.2)
dry-logic (0.6.1)
concurrent-ruby (~> 1.0)
dry-logic (0.4.2)
dry-container (~> 0.2, >= 0.2.6)
dry-core (~> 0.2)
dry-equalizer (~> 0.2)
dry-types (0.13.4)
Expand All @@ -194,12 +194,12 @@ GEM
dry-equalizer (~> 0.2)
dry-inflector (~> 0.1, >= 0.1.2)
dry-logic (~> 0.4, >= 0.4.2)
dry-validation (0.12.0)
dry-validation (0.12.3)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.1, >= 0.1.3)
dry-core (~> 0.2, >= 0.2.1)
dry-equalizer (~> 0.2)
dry-logic (~> 0.4, >= 0.4.0)
dry-logic (~> 0.4.2)
dry-types (~> 0.13.1)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
Expand Down Expand Up @@ -656,7 +656,7 @@ DEPENDENCIES
delayed_job_active_record (~> 4.1.3)
doorkeeper
dotenv-rails (= 2.7.2)
dry-validation (= 0.12.0)
dry-validation (= 0.12.3)
factory_bot_rails
faker
fakeredis
Expand Down
4 changes: 2 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,12 @@ def guessed_preferred_confirmed_email
manual_emails = verified_emails.reject { |email| email.confirmation_sent_at.nil? }
manual_emails.any? ? manual_emails.max_by(&:created_at) : verified_emails.min_by(&:created_at)
else
email_addresses.verified.order(
email_addresses.verified.order(Arel.sql(
<<-SQL.strip_heredoc
CASE WHEN "confirmation_sent_at" IS NULL THEN '-infinity' ELSE "created_at" END DESC,
"created_at" ASC
SQL
).first
)).first
end.try!(:value)
end

Expand Down
4 changes: 2 additions & 2 deletions spec/controllers/contact_infos_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@

it "returns success if code matches" do
get(:confirm, params: { code: @email.confirmation_code })
expect(response).to be_success
expect(response).to be_successful
expect(response.body).to have_no_missing_translations
expect(response.body).to have_content(t :"contact_infos.confirm.page_heading.success")
expect(response.body).to(
Expand All @@ -103,7 +103,7 @@

it "returns success if code matches" do
get(:confirm_unclaimed, params: { code: email.confirmation_code })
expect(response).to be_success
expect(response).to be_successful
expect(response.body).to have_no_missing_translations
expect(response.body).to(
have_content(t :"contact_infos.confirm_unclaimed.thanks_for_validating")
Expand Down
2 changes: 1 addition & 1 deletion spec/mailers/dev_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
expect(mail.from).to eq(['sender@localhost'])
expect(mail.subject).to eq "[OpenStax] [Accounts] (test) Howdy"
expect(mail.body.encoded).to eq(
"[\r\n [0] {\r\n :a => 2\r\n },\r\n [1] {\r\n :b => \"yo yo yo\"\r\n }\r\n]\r\n"
"[\r\n [0] {\r\n a: 2\r\n },\r\n [1] {\r\n b: \"yo yo yo\"\r\n }\r\n]\r\n"
)
end

Expand Down
2 changes: 2 additions & 0 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@

Capybara.asset_host = 'http://localhost:2999'

Capybara.server = :puma, { Silent: true } # To clean up your test output

# Normalize whitespaces
Capybara.default_normalize_ws = true

Expand Down

0 comments on commit 07645d1

Please sign in to comment.