Remove instance variables in has_filters spec
This was a false positive in Rubocop, but we can avoid it by using the attribute reader method we've just added.
This commit is contained in:
committed by
Senén Rodero Rodríguez
parent
739d23fe73
commit
21021f5054
@@ -360,7 +360,6 @@ RSpec/HookArgument:
|
|||||||
RSpec/InstanceVariable:
|
RSpec/InstanceVariable:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Exclude:
|
Exclude:
|
||||||
- spec/controllers/concerns/has_filters_spec.rb
|
|
||||||
- spec/controllers/concerns/has_orders_spec.rb
|
- spec/controllers/concerns/has_orders_spec.rb
|
||||||
|
|
||||||
RSpec/LetBeforeExamples:
|
RSpec/LetBeforeExamples:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ describe HasFilters do
|
|||||||
has_filters ["all", "pending", "reviewed"], only: :index
|
has_filters ["all", "pending", "reviewed"], only: :index
|
||||||
|
|
||||||
def index
|
def index
|
||||||
render plain: "#{@current_filter} (#{@valid_filters.join(" ")})"
|
render plain: "#{current_filter} (#{valid_filters.join(" ")})"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user