Sha256: c80545481208b2df952c392bbefd6261ac09507b93233a32b716634effb840ae
Contents?: true
Size: 809 Bytes
Versions: 16
Compression:
Stored size: 809 Bytes
Contents
require 'spec_helper' describe 'BooleanInput' do include RSpec::Rails::HelperExampleGroup include Webrat::HaveTagMatcher before(:each) do end it "should return check box tag" do helper.jquery_form_for(:new_post, :url => '/hello') do |builder| builder.input(:login, :as => :boolean).should have_tag("input[type='checkbox'].ui-boolean-input") end end it "should return check box tag with options" do helper.jquery_form_for(:new_post, :as => @object, :url => '/hello') do |builder| box = builder.input(:login, :as => :boolean, "data-name" =>"my-name", :checked_value => "One") box.should have_tag("input[type='checkbox'][data-name='my-name'][value='One'].ui-boolean-input") box.should have_tag("input[type='hidden'][value='0']") end end end
Version data entries
16 entries across 16 versions & 1 rubygems