Skip to content

Commit

Permalink
Fix rubocop convention offenses
Browse files Browse the repository at this point in the history
While we use Pronto to detect offenses in the lines changed in our pull
request, sometimes our changes introduce offenses in other lines, and we
don't detect them.

In commit 0488b37, we removed the only usage of the `heading` method
in a test, which caused a `RSpec/LetSetup` offense.

In commit 287c488, we changed some lines from `fill_in` to
`fill_in_ckeditor`. Some of these lines were aligned with the following
ones, which after that change had extra spacing for no reason.

Finally, in commit 8d38ed5 we added a line before two lines which had
their equals signs aligned. Since, after adding this line, the block was
no longer aligned, there was no reason for the extra space in one of the
lines.
  • Loading branch information
javierm committed Jul 26, 2021
1 parent b3104fa commit 1f7a121
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion spec/system/advanced_search_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@

scenario "Search by multiple filters" do
Setting["official_level_1_name"] = "Official position 1"
ana = create :user, official_level: 1
ana = create :user, official_level: 1
john = create :user, official_level: 1

create(:budget_investment, heading: heading, title: "Get Schwifty", author: ana, created_at: 1.minute.ago)
Expand Down
2 changes: 1 addition & 1 deletion spec/system/budgets/investments_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ def investments_order

fill_in "Title", with: "I am a bot"
fill_in_ckeditor "Description", with: "This is the description"
check "budget_investment_terms_of_service"
check "budget_investment_terms_of_service"

click_button "Create Investment"

Expand Down
8 changes: 4 additions & 4 deletions spec/system/emails_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -342,17 +342,17 @@
end

context "Budgets" do
let(:author) { create(:user, :level_two) }
let(:budget) { create(:budget) }
let!(:heading) { create(:budget_heading, name: "More hospitals", budget: budget) }
let(:author) { create(:user, :level_two) }
let(:budget) { create(:budget) }
before { create(:budget_heading, name: "More hospitals", budget: budget) }

scenario "Investment created" do
login_as(author)
visit new_budget_investment_path(budget_id: budget.id)

fill_in "Title", with: "Build a hospital"
fill_in_ckeditor "Description", with: "We have lots of people that require medical attention"
check "budget_investment_terms_of_service"
check "budget_investment_terms_of_service"

click_button "Create Investment"
expect(page).to have_content "Investment created successfully"
Expand Down

0 comments on commit 1f7a121

Please sign in to comment.