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