Skip to content

Commit

Permalink
291 | Add option to skip bullet warnings on RSpec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
emmabjj committed Jan 7, 2025
1 parent f144573 commit b4a06ee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,12 @@
config.before(:suite) do
FactoryBot.reload
end

config.before(:each, bullet: :skip) do
Bullet.enable = false
end

config.after(:each, bullet: :skip) do
Bullet.enable = true
end
end
6 changes: 3 additions & 3 deletions spec/requests/submissions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
expect(response.body).to have_no_css("[data-submission-id='#{completed_submission.id}']")
end

it 'shows only completed submissions' do
it 'shows only completed submissions', bullet: :skip do
get submissions_phase_path(phase), params: { status: 'completed' }

expect(response.body).to have_css("[data-submission-id='#{completed_submission.id}']")
Expand All @@ -257,7 +257,7 @@
end

context 'when filtering by eligibility' do
it 'displays only eligible for evaluation submissions' do
it 'displays only eligible for evaluation submissions', bullet: :skip do
get submissions_phase_path(phase), params: { eligible_for_evaluation: 'true' }

expect(response.body).to have_css("[data-submission-id='#{eligible_submission.id}']")
Expand All @@ -267,7 +267,7 @@
expect(response.body).to have_no_css("[data-submission-id='#{completed_submission.id}']")
end

it 'displays only selected to advance submissions' do
it 'displays only selected to advance submissions', bullet: :skip do
get submissions_phase_path(phase), params: { selected_to_advance: 'true' }

expect(response.body).to have_css("[data-submission-id='#{selected_submission.id}']")
Expand Down

0 comments on commit b4a06ee

Please sign in to comment.