Method: RSpec::Matchers#with_checkbox

Defined in:
lib/rspec2-rails-views-matchers.rb

#with_checkbox(name, value = nil) ⇒ Object



361
362
363
364
365
# File 'lib/rspec2-rails-views-matchers.rb', line 361

def with_checkbox name, value=nil
  options = { :with => { :name => name, :type => 'checkbox' } }
  options[:with].merge!(:value => value) if value
  should_have_input(options)
end

Comments