diff options
author | Carlos Goce <carlosgoce@gmail.com> | 2015-01-23 20:17:16 +0100 |
---|---|---|
committer | Carlos Goce <carlosgoce@gmail.com> | 2015-01-23 20:17:16 +0100 |
commit | dbc31d0d10db59c4b763ca84d154ed7ee3ce6abc (patch) | |
tree | b720a943098b54094a0f37ecbb4510a2892a6ba3 /spec | |
parent | 65a1a5edeebb0ccab20a967c077c508982a9dfb9 (diff) | |
download | pdf-calendars-dbc31d0d10db59c4b763ca84d154ed7ee3ce6abc.tar.gz pdf-calendars-dbc31d0d10db59c4b763ca84d154ed7ee3ce6abc.tar.bz2 pdf-calendars-dbc31d0d10db59c4b763ca84d154ed7ee3ce6abc.zip |
New class layout and method generate on calendar
Diffstat (limited to 'spec')
-rw-r--r-- | spec/calendar_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/calendar_spec.rb b/spec/calendar_spec.rb index ce042fc..765c4d9 100644 --- a/spec/calendar_spec.rb +++ b/spec/calendar_spec.rb @@ -1,5 +1,6 @@ require 'rspec' require_relative '../lib/carlosgoce/calendar' +require_relative '../lib/carlosgoce/layouts' I18n.load_path = Dir['config/locales/*.yml'] I18n.backend.load_translations @@ -42,4 +43,14 @@ describe 'Calendar' do 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') + file = 'destionation.pdf' + expect(layout).to receive(:create).with(file) + + @calendar.generate(layout, file) + end + end end
\ No newline at end of file |