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

@@ -3,18 +3,18 @@ require 'rails_helper'
describe VerificationHelper do
describe "#mask_phone" do
it "should mask a phone" do
it "masks a phone" do
expect(mask_phone("612345678")).to eq("******678")
end
end
describe "#mask_email" do
it "should mask a long email address" do
it "masks a long email address" do
expect(mask_email("isabel@example.com")).to eq("isa***@example.com")
expect(mask_email("antonio.perez@example.com")).to eq("ant**********@example.com")
end
it "should mask a short email address" do
it "masks a short email address" do
expect(mask_email("an@example.com")).to eq("an@example.com")
expect(mask_email("ana@example.com")).to eq("ana@example.com")
expect(mask_email("aina@example.com")).to eq("ain*@example.com")