def assert_select_tag(*args)
action, model, column, options = Symbol === args.first ? [nil, *args] : args
assert_kind_of Hash, options, "options needs to be a Hash"
deny options.empty?, "options must not be empty"
select_selector = "select[name='#{model}[#{column}]']"
options.each do |option_name, option_value|
option_selector = "option[value='#{option_value}']"
selector = "#{select_selector} #{option_selector}"
assert_select_in_form action do
assert_select selector, :text => option_name
end
end
end