Sha256: 3d3cf5731b0d2769ee2a14b1dddb931d368810944690c8a0a1ee7c5e170762ac
Contents?: true
Size: 894 Bytes
Versions: 16
Compression:
Stored size: 894 Bytes
Contents
require 'spec_helper' describe 'SelectInput' do include RSpec::Rails::HelperExampleGroup include Webrat::HaveTagMatcher before(:each) do end it "should return select tag" do helper.jquery_form_for(:new_post, :as => @object, :url => '/hello') do |builder| tag = builder.input(:mode, :collection => [["A","a"], ["B","b"]], :include_blank => true) tag.should have_tag("select.ui-select-input") tag.should have_tag("select>option", :count => 3) tag.should have_tag("select>option[value='a']") do |text| text.should contain("A") end end end it "should return select tag with options" do helper.jquery_form_for(:new_post, :as => @object, :url => '/hello') do |builder| builder.input(:mode, :collection => [], "data-name" =>"my-name").should have_tag("select[data-name='my-name'].ui-select-input") end end end
Version data entries
16 entries across 16 versions & 1 rubygems