Enables RSpec/ExampleWording and fixes all issues
Both avoiding 'should' and repiting 'it' on the tests description improves reading them and also makes all descriptions consistent. Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording
This commit is contained in:
@@ -3,26 +3,26 @@ require 'rails_helper'
|
||||
describe Legislation::Proposal do
|
||||
let(:proposal) { build(:legislation_proposal) }
|
||||
|
||||
it "should be valid" do
|
||||
it "is valid" do
|
||||
expect(proposal).to be_valid
|
||||
end
|
||||
|
||||
it "should not be valid without a process" do
|
||||
it "is not valid without a process" do
|
||||
proposal.process = nil
|
||||
expect(proposal).to_not be_valid
|
||||
end
|
||||
|
||||
it "should not be valid without an author" do
|
||||
it "is not valid without an author" do
|
||||
proposal.author = nil
|
||||
expect(proposal).to_not be_valid
|
||||
end
|
||||
|
||||
it "should not be valid without a title" do
|
||||
it "is not valid without a title" do
|
||||
proposal.title = nil
|
||||
expect(proposal).to_not be_valid
|
||||
end
|
||||
|
||||
it "should not be valid without a summary" do
|
||||
it "is not valid without a summary" do
|
||||
proposal.summary = nil
|
||||
expect(proposal).to_not be_valid
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user