Merge pull request #5717 from consuldemocracy/dependabot/bundler/rubocop-rspec-3.1.0
Bump rubocop-rspec from 3.0.3 to 3.1.0
This commit is contained in:
@@ -631,6 +631,9 @@ RSpec/SpecFilePathFormat:
|
|||||||
RSpec/SpecFilePathSuffix:
|
RSpec/SpecFilePathSuffix:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
RSpec/StringAsInstanceDoubleConstant:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
RSpec/UndescriptiveLiteralsDescription:
|
RSpec/UndescriptiveLiteralsDescription:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|||||||
2
Gemfile
2
Gemfile
@@ -103,7 +103,7 @@ group :development do
|
|||||||
gem "rubocop-factory_bot", "~> 2.26.1", require: false
|
gem "rubocop-factory_bot", "~> 2.26.1", require: false
|
||||||
gem "rubocop-performance", "~> 1.22.1", require: false
|
gem "rubocop-performance", "~> 1.22.1", require: false
|
||||||
gem "rubocop-rails", "~> 2.25.1", require: false
|
gem "rubocop-rails", "~> 2.25.1", require: false
|
||||||
gem "rubocop-rspec", "~> 3.0.1", require: false
|
gem "rubocop-rspec", "~> 3.1.0", require: false
|
||||||
gem "rubocop-rspec_rails", "~> 2.30.0", require: false
|
gem "rubocop-rspec_rails", "~> 2.30.0", require: false
|
||||||
gem "rvm1-capistrano3", "~> 1.4.0", require: false
|
gem "rvm1-capistrano3", "~> 1.4.0", require: false
|
||||||
gem "spring", "~> 4.2.1"
|
gem "spring", "~> 4.2.1"
|
||||||
|
|||||||
@@ -563,7 +563,7 @@ GEM
|
|||||||
rack (>= 1.1)
|
rack (>= 1.1)
|
||||||
rubocop (>= 1.33.0, < 2.0)
|
rubocop (>= 1.33.0, < 2.0)
|
||||||
rubocop-ast (>= 1.31.1, < 2.0)
|
rubocop-ast (>= 1.31.1, < 2.0)
|
||||||
rubocop-rspec (3.0.3)
|
rubocop-rspec (3.1.0)
|
||||||
rubocop (~> 1.61)
|
rubocop (~> 1.61)
|
||||||
rubocop-rspec_rails (2.30.0)
|
rubocop-rspec_rails (2.30.0)
|
||||||
rubocop (~> 1.61)
|
rubocop (~> 1.61)
|
||||||
@@ -774,7 +774,7 @@ DEPENDENCIES
|
|||||||
rubocop-factory_bot (~> 2.26.1)
|
rubocop-factory_bot (~> 2.26.1)
|
||||||
rubocop-performance (~> 1.22.1)
|
rubocop-performance (~> 1.22.1)
|
||||||
rubocop-rails (~> 2.25.1)
|
rubocop-rails (~> 2.25.1)
|
||||||
rubocop-rspec (~> 3.0.1)
|
rubocop-rspec (~> 3.1.0)
|
||||||
rubocop-rspec_rails (~> 2.30.0)
|
rubocop-rspec_rails (~> 2.30.0)
|
||||||
rvm1-capistrano3 (~> 1.4.0)
|
rvm1-capistrano3 (~> 1.4.0)
|
||||||
sassc-embedded (~> 1.70.1)
|
sassc-embedded (~> 1.70.1)
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ require "rails_helper"
|
|||||||
RSpec.describe CommentsHelper do
|
RSpec.describe CommentsHelper do
|
||||||
describe "#user_level_class" do
|
describe "#user_level_class" do
|
||||||
def comment_double(as_administrator: false, as_moderator: false, official: false)
|
def comment_double(as_administrator: false, as_moderator: false, official: false)
|
||||||
user = instance_double("User", official?: official, official_level: "Y")
|
user = instance_double(User, official?: official, official_level: "Y")
|
||||||
instance_double("Comment", as_administrator?: as_administrator, as_moderator?: as_moderator, user: user)
|
instance_double(Comment, as_administrator?: as_administrator, as_moderator?: as_moderator, user: user)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns is-admin for comment done as administrator" do
|
it "returns is-admin for comment done as administrator" do
|
||||||
@@ -45,14 +45,14 @@ RSpec.describe CommentsHelper do
|
|||||||
describe "#comment_author_class" do
|
describe "#comment_author_class" do
|
||||||
it "returns is-author if author is the commenting user" do
|
it "returns is-author if author is the commenting user" do
|
||||||
author_id = 42
|
author_id = 42
|
||||||
comment = instance_double("Comment", user_id: author_id)
|
comment = instance_double(Comment, user_id: author_id)
|
||||||
|
|
||||||
expect(helper.comment_author_class(comment, author_id)).to eq("is-author")
|
expect(helper.comment_author_class(comment, author_id)).to eq("is-author")
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns an empty string if commenter is not the author" do
|
it "returns an empty string if commenter is not the author" do
|
||||||
author_id = 42
|
author_id = 42
|
||||||
comment = instance_double("Comment", user_id: author_id - 1)
|
comment = instance_double(Comment, user_id: author_id - 1)
|
||||||
|
|
||||||
expect(helper.comment_author_class(comment, author_id)).to eq("")
|
expect(helper.comment_author_class(comment, author_id)).to eq("")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -84,19 +84,19 @@ describe Verification::Management::Document do
|
|||||||
|
|
||||||
describe "#valid_age?" do
|
describe "#valid_age?" do
|
||||||
it "returns false when the user is younger than the user's minimum required age" do
|
it "returns false when the user is younger than the user's minimum required age" do
|
||||||
census_response = instance_double("CensusApi::Response",
|
census_response = instance_double(CensusApi::Response,
|
||||||
date_of_birth: under_minium_age_date_of_birth)
|
date_of_birth: under_minium_age_date_of_birth)
|
||||||
expect(Verification::Management::Document.new.valid_age?(census_response)).to be false
|
expect(Verification::Management::Document.new.valid_age?(census_response)).to be false
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns true when the user has the user's minimum required age" do
|
it "returns true when the user has the user's minimum required age" do
|
||||||
census_response = instance_double("CensusApi::Response",
|
census_response = instance_double(CensusApi::Response,
|
||||||
date_of_birth: just_minium_age_date_of_birth)
|
date_of_birth: just_minium_age_date_of_birth)
|
||||||
expect(Verification::Management::Document.new.valid_age?(census_response)).to be true
|
expect(Verification::Management::Document.new.valid_age?(census_response)).to be true
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns true when the user is older than the user's minimum required age" do
|
it "returns true when the user is older than the user's minimum required age" do
|
||||||
census_response = instance_double("CensusApi::Response",
|
census_response = instance_double(CensusApi::Response,
|
||||||
date_of_birth: over_minium_age_date_of_birth)
|
date_of_birth: over_minium_age_date_of_birth)
|
||||||
expect(Verification::Management::Document.new.valid_age?(census_response)).to be true
|
expect(Verification::Management::Document.new.valid_age?(census_response)).to be true
|
||||||
end
|
end
|
||||||
@@ -104,19 +104,19 @@ describe Verification::Management::Document do
|
|||||||
|
|
||||||
describe "#under_age?" do
|
describe "#under_age?" do
|
||||||
it "returns true when the user is younger than the user's minimum required age" do
|
it "returns true when the user is younger than the user's minimum required age" do
|
||||||
census_response = instance_double("CensusApi::Response",
|
census_response = instance_double(CensusApi::Response,
|
||||||
date_of_birth: under_minium_age_date_of_birth)
|
date_of_birth: under_minium_age_date_of_birth)
|
||||||
expect(Verification::Management::Document.new.under_age?(census_response)).to be true
|
expect(Verification::Management::Document.new.under_age?(census_response)).to be true
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns false when the user is user's minimum required age" do
|
it "returns false when the user is user's minimum required age" do
|
||||||
census_response = instance_double("CensusApi::Response",
|
census_response = instance_double(CensusApi::Response,
|
||||||
date_of_birth: just_minium_age_date_of_birth)
|
date_of_birth: just_minium_age_date_of_birth)
|
||||||
expect(Verification::Management::Document.new.under_age?(census_response)).to be false
|
expect(Verification::Management::Document.new.under_age?(census_response)).to be false
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns false when the user is older than user's minimum required age" do
|
it "returns false when the user is older than user's minimum required age" do
|
||||||
census_response = instance_double("CensusApi::Response",
|
census_response = instance_double(CensusApi::Response,
|
||||||
date_of_birth: over_minium_age_date_of_birth)
|
date_of_birth: over_minium_age_date_of_birth)
|
||||||
expect(Verification::Management::Document.new.under_age?(census_response)).to be false
|
expect(Verification::Management::Document.new.under_age?(census_response)).to be false
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user