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