diff --git a/spec/support/matchers/select2_matchers.rb b/spec/support/matchers/select2_matchers.rb index 58bfc690d8..5e57f05d73 100644 --- a/spec/support/matchers/select2_matchers.rb +++ b/spec/support/matchers/select2_matchers.rb @@ -21,7 +21,7 @@ RSpec::Matchers.define :have_select2 do |id, options={}| if results.all? results << all_options_present(from, options[:with_options]) if options.key? :with_options results << exact_options_present(from, options[:options]) if options.key? :options - results << no_options_present(from, options[:without_options]) if options.key? :without_options + results << all_options_absent(from, options[:without_options]) if options.key? :without_options end results.all? @@ -88,14 +88,6 @@ RSpec::Matchers.define :have_select2 do |id, options={}| end end - def no_options_present(from, options) - with_select2_open(from) do - options.none? do |option| - @node.has_selector? "div.select2-drop-active ul.select2-results li", text: option - end - end - end - def selected_option_is(from, text) within find(from) do find("a.select2-choice").text == text