diff options
| author | Robert | 2017-06-27 19:58:48 +0200 |
|---|---|---|
| committer | Robert | 2017-06-27 20:11:18 +0200 |
| commit | 083d23585935139b5e87b99bf5cc2a79f4a53cca (patch) | |
| tree | d733458dca16e08cece47d915146f8e95126cf6a /spec | |
| parent | dcf8868773491c66c4527fe768ceacef38cf0e16 (diff) | |
| download | chouette-core-083d23585935139b5e87b99bf5cc2a79f4a53cca.tar.bz2 | |
Refs: #3595@0.5h live event subscription & smart_date class added to all date input elements
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/models/calendar/calendar_date_spec.rb | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/spec/models/calendar/calendar_date_spec.rb b/spec/models/calendar/calendar_date_spec.rb deleted file mode 100644 index 25fe8ba8d..000000000 --- a/spec/models/calendar/calendar_date_spec.rb +++ /dev/null @@ -1,38 +0,0 @@ -RSpec.describe Calendar::CalendarDate do - - subject { described_class.new(year, month, day) } - let( :year ){ 2000 } - let( :month ){ 2 } - - let( :str_repr ){ %r{#{year}-0?#{month}-0?#{day}} } - - - - shared_examples_for "date accessors" do - it "accesses year" do - expect( subject.year ).to eq(year) - end - it "accesses month" do - expect( subject.month ).to eq(month) - end - it "accesses day" do - expect( subject.day ).to eq(day) - end - it "converts to a string" do - expect( subject.to_s ).to match(str_repr) - end - end - - context 'legal' do - let( :day ){ 29 } - it { expect_it.to be_legal } - it_should_behave_like "date accessors" - end - - context 'illegal' do - let( :day ){ 30 } - it { expect_it.not_to be_legal } - it_should_behave_like "date accessors" - end - -end |
