blob: 5f1164f747dcbdb6dbcf3756e6de3d936724affd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
require 'rspec'
require_relative '../lib/carlosgoce/calendar'
require_relative '../lib/carlosgoce/layout/layouts'
describe 'Layout simple' do
before(:each) do
@calendar = CarlosGoce::Calendar.new
@layout = CarlosGoce::Layout::Simple.new
@file = 'spec/output/simple.pdf'
FileUtils.rm_f(@file)
end
# Check the generated file on spec/output
it 'creates a pdf' do
@calendar.generate(@layout, @file, Date.today.year)
expect(File.exist? @file).to be(true), lambda {"File #{@file} was not created"}
end
end
|