Sha256: 4f7942a4046fdeef16c2e761188bd260e23c1203e417119219da66705a90c47e

Contents?: true

Size: 642 Bytes

Versions: 16

Compression:

Stored size: 642 Bytes

Contents

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
jquery-ui-form-0.2.8 spec/inputs/file_input_spec.rb
jquery-ui-form-0.2.7 spec/inputs/file_input_spec.rb
jquery-ui-form-0.2.6 spec/inputs/file_input_spec.rb
jquery-ui-form-0.2.5 spec/inputs/file_input_spec.rb
jquery-ui-form-0.2.4 spec/inputs/file_input_spec.rb
jquery-ui-form-0.2.3 spec/inputs/file_input_spec.rb
jquery-ui-form-0.2.2 spec/inputs/file_input_spec.rb
jquery-ui-form-0.2.1 spec/inputs/file_input_spec.rb
jquery-ui-form-0.2.0 spec/inputs/file_input_spec.rb
jquery-ui-form-0.1.6 spec/inputs/file_input_spec.rb
jquery-ui-form-0.1.5 spec/inputs/file_input_spec.rb
jquery-ui-form-0.1.4 spec/inputs/file_input_spec.rb
jquery-ui-form-0.1.3 spec/inputs/file_input_spec.rb
jquery-ui-form-0.1.2 spec/inputs/file_input_spec.rb
jquery-ui-form-0.1.1 spec/inputs/file_input_spec.rb
jquery-ui-form-0.1.0 spec/inputs/file_input_spec.rb