require 'spec_helper' describe 'HiddenInput' do include RSpec::Rails::HelperExampleGroup include Webrat::HaveTagMatcher before(:each) do end it "should return hidden tag" do helper.jquery_form_for(:new_post, :as => @object, :url => '/hello') do |builder| builder.input(:login, :as => :hidden).should have_tag("input[type='hidden']") end end it "should return hidden tag with options" do helper.jquery_form_for(:new_post, :as => @object, :url => '/hello') do |builder| builder.input(:login, :as => :hidden, "data-name" =>"my-name").should have_tag("input[type='hidden'][data-name='my-name']") end end end