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