Method: RSpec::Matchers#with_hidden_field

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

#with_hidden_field(name, value = nil) ⇒ Object



241
242
243
244
245
# File 'lib/rspec2-rails-views-matchers.rb', line 241

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

Comments