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:
@@ -4,21 +4,21 @@ describe Follow do
|
||||
|
||||
let(:follow) { build(:follow, :followed_proposal) }
|
||||
|
||||
it "should be valid" do
|
||||
it "is valid" do
|
||||
expect(follow).to be_valid
|
||||
end
|
||||
|
||||
it "should not be valid without a user_id" do
|
||||
it "is not valid without a user_id" do
|
||||
follow.user_id = nil
|
||||
expect(follow).to_not be_valid
|
||||
end
|
||||
|
||||
it "should not be valid without a followable_id" do
|
||||
it "is not valid without a followable_id" do
|
||||
follow.followable_id = nil
|
||||
expect(follow).to_not be_valid
|
||||
end
|
||||
|
||||
it "should not be valid without a followable_type" do
|
||||
it "is not valid without a followable_type" do
|
||||
follow.followable_type = nil
|
||||
expect(follow).to_not be_valid
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user