Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
⬆️ Upgrade gem "rspec-rails" to 4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ledermann committed Dec 14, 2020
1 parent 27b23fb commit 03408cc
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 29 deletions.
38 changes: 19 additions & 19 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -300,27 +300,27 @@ GEM
rack (>= 1.4)
rexml (3.2.4)
rollbar (3.1.1)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.3)
rspec-support (~> 3.9.3)
rspec-expectations (3.9.4)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.0)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-rails (3.9.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.4)
rspec-support (~> 3.10.0)
rspec-rails (4.0.1)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
rspec-core (~> 3.9)
rspec-expectations (~> 3.9)
rspec-mocks (~> 3.9)
rspec-support (~> 3.9)
rspec-support (3.10.0)
rubocop (1.6.1)
parallel (~> 1.10)
parser (>= 2.7.1.5)
Expand Down
2 changes: 1 addition & 1 deletion spec/factories/clip.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FactoryBot.define do
factory :clip do
post { create :post }
image { fixture_file_upload("spec/fixtures/example.jpg") }
image { Rack::Test::UploadedFile.new('spec/fixtures/example.jpg', 'image/png') }
end

factory :clip_unprocessed, class: Clip do
Expand Down
3 changes: 0 additions & 3 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
require 'email_spec'
require 'email_spec/rspec'

# needed for fixture_file_upload
include ActionDispatch::TestProcess

# Checks for pending migration and applies them before tests are run.
# If you are not using ActiveRecord, you can remove this line.
ActiveRecord::Migration.maintain_test_schema!
Expand Down
2 changes: 2 additions & 0 deletions spec/requests/api/v1/posts_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require 'rails_helper'

include ActiveSupport::Testing::Assertions

describe "Posts", type: :request do
let!(:post1) { create(:post, :reindex, id: 42, title: 'Foo', content: 'Lorem ipsum') }
let!(:clip) { perform_enqueued_jobs { create(:clip, id: 123, post: post1) } }
Expand Down
4 changes: 0 additions & 4 deletions spec/support/system/clearance_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ def reset_password_for(email)
visit new_password_path
fill_in "password_email", with: email
click_button I18n.t("helpers.submit.password.submit")

perform_enqueued_jobs
end

def sign_in
Expand All @@ -30,8 +28,6 @@ def sign_up_with(email, password)
fill_in "user_email", with: email
fill_in "user_password", with: password
click_button I18n.t("helpers.submit.user.create")

perform_enqueued_jobs
end

def expect_user_to_be_signed_in
Expand Down
1 change: 0 additions & 1 deletion spec/system/posts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
all(:css, "trix-editor").first.click.set('dolor sit amet')

click_on 'Update Post'
perform_enqueued_jobs
end

Capybara.using_session(:first_user) do
Expand Down
2 changes: 1 addition & 1 deletion spec/uploaders/image_uploader_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
end

it 'rejects other files than images' do
clip = post.clips.build image: fixture_file_upload('spec/fixtures/example.txt')
clip = post.clips.build image: Rack::Test::UploadedFile.new('spec/fixtures/example.txt', 'text/plain')

clip.valid?
expect(clip.errors[:image]).to eq ['type must be one of: image/jpeg, image/png, image/gif']
Expand Down

0 comments on commit 03408cc

Please sign in to comment.