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:
Bertocq
2018-01-07 00:57:50 +01:00
parent 971f2e308a
commit ed16a78f42
73 changed files with 482 additions and 479 deletions

View File

@@ -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