diff options
author | Carlos Goce <carlosgoce@gmail.com> | 2015-01-24 20:14:56 +0100 |
---|---|---|
committer | Carlos Goce <carlosgoce@gmail.com> | 2015-01-24 20:14:56 +0100 |
commit | 47a55ef9ca277fcbce1ad1e908eb2110c2da57b4 (patch) | |
tree | f15c9376adc088504c42f6f88b4d8de02f677db5 /spec | |
parent | 9c75e0553d3ebce71eb1dc07b1df59f05b05ad2a (diff) | |
download | pdf-calendars-47a55ef9ca277fcbce1ad1e908eb2110c2da57b4.tar.gz pdf-calendars-47a55ef9ca277fcbce1ad1e908eb2110c2da57b4.tar.bz2 pdf-calendars-47a55ef9ca277fcbce1ad1e908eb2110c2da57b4.zip |
Add formatted days spec
Diffstat (limited to 'spec')
-rw-r--r-- | spec/calendar_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/calendar_spec.rb b/spec/calendar_spec.rb index 6739a9f..8d8e346 100644 --- a/spec/calendar_spec.rb +++ b/spec/calendar_spec.rb @@ -41,12 +41,18 @@ describe 'Calendar' do I18n.locale = 'es' expect(@calendar.to_h[1][:days_names].first).to eq 'jueves' end + + # todo Improve spec description + it 'return the days available formated as array leaving blank days for the starting week\'s day' do + days_for_january_2015 = ['', '', ''] + (1..31).to_a + expect(@calendar.to_h[:formatted_days].first).to eq days_for_january_2015 + end end describe 'Can generate a pdfs' do it 'should receive a layout and pass it the data to create the specified file' do layout = instance_double('CarlosGoce::Layout::Simple') - file = 'destionation.pdf' + file = 'destination.pdf' year = 2015 expect(layout).to receive(:create).with(file, @calendar.to_h, year) |