提交 523f9809 编写于 作者: E Emilio Tagua

Remove more warnings on AP.

上级 ad2c2108
......@@ -102,8 +102,8 @@ def loaded?
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 @@ def css_select(*args)
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 @@ def assert_select_rjs(*args, &block)
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 @@ def test_conditional_skipping_of_filters
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册