Sha256: 007ae43d6bcb179741fa0e485bfb6bf8de120ffcb410bd85199c1b08313b0d3d
Contents?: true
Size: 1 KB
Versions: 4
Compression:
Stored size: 1 KB
Contents
# frozen_string_literal: true 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 do expect(date).to receive(:to_s).with(:calendar).and_return('25-12-2000') expect(Timely).to receive(:current_date).and_return(date) end it 'should generate calendar tags' do expect(string).to receive(:html_safe) expect(subject).to receive(:tag).with(:input, id: 'test', class: 'datepicker', 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.9.0 | spec/calendar_tag_spec.rb |
timely-0.8.0 | spec/calendar_tag_spec.rb |
timely-0.7.0 | spec/calendar_tag_spec.rb |
timely-0.6.0 | spec/calendar_tag_spec.rb |