Add and apply RSpec/EmptyLineAfterExample rule

It was introduced in rubocop-rspec 1.36.0. We were already applying it
almost everywhere.
This commit is contained in:
Javi Martín
2020-09-27 20:46:03 +02:00
parent 4865cbeb59
commit b6a095ced7
3 changed files with 11 additions and 0 deletions

View File

@@ -324,6 +324,9 @@ RSpec/EmptyExampleGroup:
Exclude: Exclude:
- spec/factories/**/* - spec/factories/**/*
RSpec/EmptyLineAfterExample:
Enabled: true
RSpec/EmptyLineAfterExampleGroup: RSpec/EmptyLineAfterExampleGroup:
Enabled: true Enabled: true
Exclude: Exclude:

View File

@@ -217,6 +217,7 @@ describe Budget do
budget.phase = "reviewing" budget.phase = "reviewing"
expect(budget.investments_orders).to eq(["random"]) expect(budget.investments_orders).to eq(["random"])
end end
it "is random and price when ballotting and reviewing ballots" do it "is random and price when ballotting and reviewing ballots" do
budget.phase = "publishing_prices" budget.phase = "publishing_prices"
expect(budget.investments_orders).to eq(["random", "price"]) expect(budget.investments_orders).to eq(["random", "price"])
@@ -225,6 +226,7 @@ describe Budget do
budget.phase = "reviewing_ballots" budget.phase = "reviewing_ballots"
expect(budget.investments_orders).to eq(["random", "price"]) expect(budget.investments_orders).to eq(["random", "price"])
end end
it "is random and confidence_score in all other cases" do it "is random and confidence_score in all other cases" do
budget.phase = "selecting" budget.phase = "selecting"
expect(budget.investments_orders).to eq(["random", "confidence_score"]) expect(budget.investments_orders).to eq(["random", "confidence_score"])

View File

@@ -7,15 +7,18 @@ describe Organization do
it "is false when verified_at? is blank" do it "is false when verified_at? is blank" do
expect(subject.verified?).to be false expect(subject.verified?).to be false
end end
it "is true when verified_at? exists" do it "is true when verified_at? exists" do
subject.verified_at = Time.current subject.verified_at = Time.current
expect(subject.verified?).to be true expect(subject.verified?).to be true
end end
it "is false when the organization was verified and then rejected" do it "is false when the organization was verified and then rejected" do
subject.verified_at = Time.current subject.verified_at = Time.current
subject.rejected_at = Time.current + 1 subject.rejected_at = Time.current + 1
expect(subject.verified?).to be false expect(subject.verified?).to be false
end end
it "is true when the organization was rejected and then verified" do it "is true when the organization was rejected and then verified" do
subject.rejected_at = Time.current subject.rejected_at = Time.current
subject.verified_at = Time.current + 1 subject.verified_at = Time.current + 1
@@ -27,15 +30,18 @@ describe Organization do
it "is false when rejected_at? is blank" do it "is false when rejected_at? is blank" do
expect(subject.rejected?).to be false expect(subject.rejected?).to be false
end end
it "is true when rejected_at? exists" do it "is true when rejected_at? exists" do
subject.rejected_at = Time.current subject.rejected_at = Time.current
expect(subject.rejected?).to be true expect(subject.rejected?).to be true
end end
it "is true when the organization was verified and then rejected" do it "is true when the organization was verified and then rejected" do
subject.verified_at = Time.current subject.verified_at = Time.current
subject.rejected_at = Time.current + 1 subject.rejected_at = Time.current + 1
expect(subject.rejected?).to be true expect(subject.rejected?).to be true
end end
it "is false when the organization was rejected and then verified" do it "is false when the organization was rejected and then verified" do
subject.rejected_at = Time.current subject.rejected_at = Time.current
subject.verified_at = Time.current + 1 subject.verified_at = Time.current + 1