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:
@@ -9,7 +9,7 @@ describe Users::RegistrationsController do
|
||||
end
|
||||
|
||||
context "when username is available" do
|
||||
it "should return true with no error message" do
|
||||
it "returns true with no error message" do
|
||||
get :check_username, username: "available username"
|
||||
|
||||
data = JSON.parse response.body, symbolize_names: true
|
||||
@@ -19,7 +19,7 @@ describe Users::RegistrationsController do
|
||||
end
|
||||
|
||||
context "when username is not available" do
|
||||
it "should return false with an error message" do
|
||||
it "returns false with an error message" do
|
||||
user = create(:user)
|
||||
get :check_username, username: user.username
|
||||
|
||||
|
||||
Reference in New Issue
Block a user