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