Sha256: 3365d10ffd311271aa5ab0081f1b36c42bcc7abe007d7896bb94ed25e06ee445
Contents?: true
Size: 687 Bytes
Versions: 8
Compression:
Stored size: 687 Bytes
Contents
require 'spec_helper' class TitledReport < Rescpos::Report attr_reader :title def initialize(title = '') @title = title end end describe Rescpos::Report do before(:all) do Rescpos.configure do |config| config.template_path = File.join(File.dirname(__FILE__), "../../reports") end end after(:all) do Rescpos.instance_variable_set(:@configuration, nil) end let(:report) { report = TitledReport.new('A title') } it 'renders the report with a string template' do report.render(:template => '<%= @title %>').should == 'A title' end it 'renders the report using default template file' do report.render.should == "A title\n" end end
Version data entries
8 entries across 8 versions & 1 rubygems