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