| spec_helper.rb - reportable - Fork of reportable required by WarVox, from hdm/r… | |
| git clone git://jay.scot/reportable | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| spec_helper.rb (1421B) | |
| --- | |
| 1 ENV['RAILS_ENV'] = 'test' | |
| 2 | |
| 3 require 'rubygems' | |
| 4 require 'bundler/setup' | |
| 5 require 'active_record' | |
| 6 require 'active_record/version' | |
| 7 require 'active_support' | |
| 8 | |
| 9 begin | |
| 10 require 'ruby-debug' | |
| 11 # Debugger.start | |
| 12 # Debugger.settings[:autoeval] = true if Debugger.respond_to?(:setting… | |
| 13 rescue LoadError | |
| 14 # ruby-debug wasn't available so neither can the debugging be | |
| 15 end | |
| 16 | |
| 17 ROOT = Pathname(File.expand_path(File.join(File.dirname(__FILE__), '..')… | |
| 18 | |
| 19 $LOAD_PATH << File.join(ROOT, 'lib') | |
| 20 $LOAD_PATH << File.join(ROOT, 'lib/saulabs') | |
| 21 | |
| 22 require File.join(ROOT, 'lib', 'saulabs', 'reportable.rb') | |
| 23 | |
| 24 # Rails::Initializer.run(:set_load_path) | |
| 25 # Rails::Initializer.run(:set_autoload_paths) | |
| 26 # Rails::Initializer.run(:initialize_time_zone) do |config| | |
| 27 # config.time_zone = 'Pacific Time (US & Canada)' | |
| 28 # end | |
| 29 | |
| 30 # FileUtils.mkdir_p File.join(File.dirname(__FILE__), 'log') | |
| 31 # ActiveRecord::Base.logger = ActiveSupport::BufferedLogger.new(File.dir… | |
| 32 | |
| 33 RSpec.configure do |config| | |
| 34 config.filter_run :focus => true | |
| 35 config.run_all_when_everything_filtered = true | |
| 36 end | |
| 37 ActiveRecord::Base.default_timezone = :local | |
| 38 | |
| 39 databases = YAML::load(IO.read(File.join(File.dirname(__FILE__), 'db', '… | |
| 40 ActiveRecord::Base.establish_connection(databases[ENV['DB'] || 'sqlite3'… | |
| 41 load(File.join(File.dirname(__FILE__), 'db', 'schema.rb')) | |
| 42 | |
| 43 class User < ActiveRecord::Base; end | |
| 44 | |
| 45 class YieldMatchException < Exception; end |