Remove unused variables

Detected thanks to the RSpec/LetSetup rule after updating rubocop-rspec.
This commit is contained in:
Javi Martín
2020-10-23 18:19:07 +02:00
parent dd7d6440ec
commit d2d95c8df7
5 changed files with 5 additions and 11 deletions

View File

@@ -1,6 +1,5 @@
shared_examples "acts as imageable" do |imageable_factory| shared_examples "acts as imageable" do |imageable_factory|
let!(:image) { build(:image, imageable_factory.to_sym) } let!(:image) { build(:image, imageable_factory.to_sym) }
let!(:imageable) { image.imageable }
it "is valid" do it "is valid" do
expect(image).to be_valid expect(image).to be_valid

View File

@@ -2,7 +2,6 @@ shared_examples "document validations" do |documentable_factory|
include DocumentablesHelper include DocumentablesHelper
let!(:document) { build(:document, documentable_factory.to_sym) } let!(:document) { build(:document, documentable_factory.to_sym) }
let!(:documentable) { document.documentable }
let!(:maxfilesize) { max_file_size(document.documentable.class) } let!(:maxfilesize) { max_file_size(document.documentable.class) }
let!(:acceptedcontenttypes) { accepted_content_types(document.documentable.class) } let!(:acceptedcontenttypes) { accepted_content_types(document.documentable.class) }

View File

@@ -2,7 +2,6 @@ shared_examples "image validations" do |imageable_factory|
include ImageablesHelper include ImageablesHelper
let!(:image) { build(:image, imageable_factory.to_sym) } let!(:image) { build(:image, imageable_factory.to_sym) }
let!(:imageable) { image.imageable }
let!(:acceptedcontenttypes) { imageable_accepted_content_types } let!(:acceptedcontenttypes) { imageable_accepted_content_types }
it "is valid" do it "is valid" do

View File

@@ -1,7 +1,6 @@
shared_examples "followable" do |followable_class_name, followable_path, followable_path_arguments| shared_examples "followable" do |followable_class_name, followable_path, followable_path_arguments|
let!(:arguments) { {} } let!(:arguments) { {} }
let!(:followable) { create(followable_class_name) } let!(:followable) { create(followable_class_name) }
let!(:followable_dom_name) { followable_class_name.tr("_", "-") }
def dom_id(record) def dom_id(record)
ActionView::RecordIdentifier.dom_id(record) ActionView::RecordIdentifier.dom_id(record)

View File

@@ -2,9 +2,7 @@ shared_examples "imageable" do |imageable_factory_name, imageable_path, imageabl
let!(:administrator) { create(:user) } let!(:administrator) { create(:user) }
let!(:user) { create(:user) } let!(:user) { create(:user) }
let!(:imageable_arguments) { {} } let!(:imageable_arguments) { {} }
let!(:imageables_arguments) { {} }
let!(:imageable) { create(imageable_factory_name, author: user) } let!(:imageable) { create(imageable_factory_name, author: user) }
let!(:imageable_dom_name) { imageable_factory_name.parameterize }
before do before do
create(:administrator, user: administrator) create(:administrator, user: administrator)