Remove more warnings on AP.
This commit is contained in:
parent
ad2c21089e
commit
523f98099d
|
@ -102,8 +102,8 @@ module ActionDispatch
|
|||
|
||||
def destroy
|
||||
clear
|
||||
@by.send(:destroy, @env) if @by
|
||||
@env[ENV_SESSION_OPTIONS_KEY][:id] = nil if @env && @env[ENV_SESSION_OPTIONS_KEY]
|
||||
@by.send(:destroy, @env) if defined?(@by) && @by
|
||||
@env[ENV_SESSION_OPTIONS_KEY][:id] = nil if defined?(@env) && @env && @env[ENV_SESSION_OPTIONS_KEY]
|
||||
@loaded = false
|
||||
end
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ module ActionDispatch
|
|||
arg = args.shift
|
||||
elsif arg == nil
|
||||
raise ArgumentError, "First argument is either selector or element to select, but nil found. Perhaps you called assert_select with an element that does not exist?"
|
||||
elsif @selected
|
||||
elsif defined?(@selected) && @selected
|
||||
matches = []
|
||||
|
||||
@selected.each do |selected|
|
||||
|
@ -443,6 +443,7 @@ module ActionDispatch
|
|||
assert_block("") { true } # to count the assertion
|
||||
if block_given? && !([:remove, :show, :hide, :toggle].include? rjs_type)
|
||||
begin
|
||||
@selected ||= nil
|
||||
in_scope, @selected = @selected, matches
|
||||
yield matches
|
||||
ensure
|
||||
|
|
|
@ -669,7 +669,7 @@ class FilterTest < ActionController::TestCase
|
|||
assert_equal %w( ensure_login find_user ), assigns["ran_filter"]
|
||||
|
||||
test_process(ConditionalSkippingController, "login")
|
||||
assert_nil @controller.instance_variable_get("@ran_after_filter")
|
||||
assert !@controller.instance_variable_defined?("@ran_after_filter")
|
||||
test_process(ConditionalSkippingController, "change_password")
|
||||
assert_equal %w( clean_up ), @controller.instance_variable_get("@ran_after_filter")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue