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,19 +3,19 @@ require 'rails_helper'
|
||||
describe ApplicationHelper do
|
||||
|
||||
describe "#author_of?" do
|
||||
it "should be true if user is the author" do
|
||||
it "is true if user is the author" do
|
||||
user = create(:user)
|
||||
proposal = create(:proposal, author: user)
|
||||
expect(author_of?(proposal, user)).to eq true
|
||||
end
|
||||
|
||||
it "should be false if user is not the author" do
|
||||
it "is false if user is not the author" do
|
||||
user = create(:user)
|
||||
proposal = create(:proposal)
|
||||
expect(author_of?(proposal, user)).to eq false
|
||||
end
|
||||
|
||||
it "should be false if user or authorable is nil" do
|
||||
it "is false if user or authorable is nil" do
|
||||
user = create(:user)
|
||||
proposal = create(:proposal)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user