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:
- spec/factories/**/*
RSpec/EmptyLineAfterExample:
Enabled: true
RSpec/EmptyLineAfterExampleGroup:
Enabled: true
Exclude:

View File

@@ -217,6 +217,7 @@ describe Budget do
budget.phase = "reviewing"
expect(budget.investments_orders).to eq(["random"])
end
it "is random and price when ballotting and reviewing ballots" do
budget.phase = "publishing_prices"
expect(budget.investments_orders).to eq(["random", "price"])
@@ -225,6 +226,7 @@ describe Budget do
budget.phase = "reviewing_ballots"
expect(budget.investments_orders).to eq(["random", "price"])
end
it "is random and confidence_score in all other cases" do
budget.phase = "selecting"
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
expect(subject.verified?).to be false
end
it "is true when verified_at? exists" do
subject.verified_at = Time.current
expect(subject.verified?).to be true
end
it "is false when the organization was verified and then rejected" do
subject.verified_at = Time.current
subject.rejected_at = Time.current + 1
expect(subject.verified?).to be false
end
it "is true when the organization was rejected and then verified" do
subject.rejected_at = Time.current
subject.verified_at = Time.current + 1
@@ -27,15 +30,18 @@ describe Organization do
it "is false when rejected_at? is blank" do
expect(subject.rejected?).to be false
end
it "is true when rejected_at? exists" do
subject.rejected_at = Time.current
expect(subject.rejected?).to be true
end
it "is true when the organization was verified and then rejected" do
subject.verified_at = Time.current
subject.rejected_at = Time.current + 1
expect(subject.rejected?).to be true
end
it "is false when the organization was rejected and then verified" do
subject.rejected_at = Time.current
subject.verified_at = Time.current + 1