Method: RSpec::Matchers#have_form

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

- (Object) have_form(action_url, method, options = {}, &block)



232
233
234
235
236
237
238
239
# File 'lib/rspec2-rails-views-matchers.rb', line 232

def have_form action_url, method, options={}, &block
  options[:with] ||= {}
  id = options[:with].delete(:id)
  tag = 'form'; tag += '#'+id if id
  options[:with].merge!(:action => action_url)
  options[:with].merge!(:method => method.to_s)
  have_tag tag, options, &block
end

Comments