# Configure Rails Environment ENV["RAILS_ENV"] = "test" require File.expand_path("../dummy/config/environment.rb", __FILE__) require "rails/test_help" require "rails/generators" require "flexmock/test_unit" require "factory_girl" require "shoulda" require "paperclip/matchers" Rails.backtrace_cleaner.remove_silencers! # Load support files Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } # Load factories Dir["#{File.dirname(__FILE__)}/factories/*.rb"].each { |f| require f } MintReporter.config do |c| c.paperclip_storage_options = { :url => "http://test.local/uploads/:class/:id_partition/:style.:extension", :path => ":rails_root/public/uploads/test/:class/:id_partition/:style.:extension" } c.reports = %w[BasicReport BlankReport] end class BasicReport < Report def csv_column_names ['col1', 'col2'] end def csv_row(record) [record.one, record.two] end def records [ OpenStruct.new(:one => 'one', :two => 'two'), OpenStruct.new(:one => 'a', :two => 'b') ] end end class ActiveSupport::TestCase extend Paperclip::Shoulda::Matchers end