Module: Chosen::Rspec::FeatureHelpers

Defined in:
lib/chosen-rails/rspec.rb

Instance Method Summary collapse

Instance Method Details

#chosen_select(value, *args) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/chosen-rails/rspec.rb', line 4

def chosen_select(value, *args)
  options = args.extract_options!

  input = chosen_input(options)

  args.unshift(value).uniq.each { |item| chosen_select!(input, item) }
end

#chosen_unselect(value, *args) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/chosen-rails/rspec.rb', line 12

def chosen_unselect(value, *args)
  options = args.extract_options!

  input = chosen_input(options)

  args.unshift(value).uniq.each { |item| chosen_unselect!(input, item) }
end