Sha256: 86098c2ecb6c67fc85244993286fe04746df3f5f799c678868ac631af6fdcc54
Contents?: true
Size: 785 Bytes
Versions: 4
Compression:
Stored size: 785 Bytes
Contents
require 'spec_helper' class ActionViewTest include Timely::ActionViewHelpers::FormTagHelper end describe Timely::ActionViewHelpers do subject { ActionViewTest.new } let(:string) { double(:string) } let(:date) { Date.new(2000, 12, 25) } before { expect(date).to receive(:to_s).with(:calendar).and_return('25-12-2000') expect(Timely).to receive(:current_date).and_return(date) } it 'should generate calendar tags' do expect(string).to receive(:html_safe) expect(subject).to receive(:tag).with(:input, :id => 'test', :class => 'datepicker input-small', :size => 10, :maxlength => 10, :name => 'test', :type => 'text', :value => '25-12-2000' ).and_return(string) subject.calendar_tag :test end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
timely-0.3.2 | spec/calendar_tag_spec.rb |
timely-0.3.1 | spec/calendar_tag_spec.rb |
timely-0.3.0 | spec/calendar_tag_spec.rb |
timely-0.1.0 | spec/calendar_tag_spec.rb |