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:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
- spec/controllers/concerns/has_filters_spec.rb
|
||||
- spec/controllers/concerns/has_orders_spec.rb
|
||||
|
||||
RSpec/LetBeforeExamples:
|
||||
|
||||
@@ -6,7 +6,7 @@ describe HasFilters do
|
||||
has_filters ["all", "pending", "reviewed"], only: :index
|
||||
|
||||
def index
|
||||
render plain: "#{@current_filter} (#{@valid_filters.join(" ")})"
|
||||
render plain: "#{current_filter} (#{valid_filters.join(" ")})"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user