blob: 5f1164f747dcbdb6dbcf3756e6de3d936724affd (
plain) (
tree)
|
|
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
|