Sha256: b4998a445783e7c05b7598c259c45d247796497a42e01092b405afe78fc459d6
Contents?: true
Size: 914 Bytes
Versions: 1
Compression:
Stored size: 914 Bytes
Contents
require 'spec_helper' describe ActionView::Helpers::FormBuilder do before(:each) do @template = Object.new @template.extend ActionView::Helpers::FormHelper @template.extend ActionView::Helpers::FormOptionsHelper @schedule = FactoryGirl.create(:schedule) @object = double(Schedule) @builder = ActionView::Helpers::FormBuilder.new(:schedule, @schedule, @template, {}) end describe "Instance methods" do it "has a method hd_picker" do @builder.should respond_to(:hd_picker) end # JOM - I just left this here as an example # describe '#hd_picker' do # it 'sets the value of the hidden field based on value passed in' do # input = @builder.hd_picker(:birthday, { html: { value: "1/1/2001" } }) # input_val = Nokogiri::HTML.parse(input).xpath("//input[@id='birthday_hdn']").first[:value] # expect(input_val).to eq "2001-01-01" # end # end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hot_date_rails-1.5.7 | spec/helpers/form_helper_spec.rb |