diff options
-rw-r--r-- | lib/carlosgoce/calendar.rb | 2 | ||||
-rw-r--r-- | lib/carlosgoce/layouts.rb | 2 | ||||
-rw-r--r-- | spec/calendar_spec.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/carlosgoce/calendar.rb b/lib/carlosgoce/calendar.rb index 370ada6..429cc0e 100644 --- a/lib/carlosgoce/calendar.rb +++ b/lib/carlosgoce/calendar.rb @@ -31,7 +31,7 @@ module CarlosGoce end def generate(layout, file) - layout.create file + layout.create file, to_h end end end diff --git a/lib/carlosgoce/layouts.rb b/lib/carlosgoce/layouts.rb index 65d5ad1..962f8cb 100644 --- a/lib/carlosgoce/layouts.rb +++ b/lib/carlosgoce/layouts.rb @@ -1,6 +1,6 @@ module CarlosGoce class Layout - def create(file) + def create(file, hash) end end diff --git a/spec/calendar_spec.rb b/spec/calendar_spec.rb index 765c4d9..f13cf93 100644 --- a/spec/calendar_spec.rb +++ b/spec/calendar_spec.rb @@ -48,7 +48,7 @@ describe 'Calendar' 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) + expect(layout).to receive(:create).with(file, @calendar.to_h) @calendar.generate(layout, file) end |