Sha256: 0e99dc808926b6e79796b171949a42f5d35be89d204cd24d8e1c8e86e92fc7bc
Contents?: true
Size: 1.13 KB
Versions: 3
Compression:
Stored size: 1.13 KB
Contents
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rspec' require 'stratify-itunes' # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} require 'database_cleaner' RSpec.configure do |config| config.color_enabled = true config.formatter = :progress # Configure RSpec to run focused specs, and also respect the alias 'fit' for focused specs config.filter_run :focused => true config.run_all_when_everything_filtered = true config.alias_example_to :fit, :focused => true # Configure RSpec to truncate the database before any spec tagged with ":database => true" DatabaseCleaner.strategy = :truncation DatabaseCleaner.orm = "mongoid" config.before(:each, :database => true) do DatabaseCleaner.clean end config.before(:suite) do initialize_mongoid_configuration end end def initialize_mongoid_configuration mongoid_config = YAML::load_file(File.join(File.dirname(__FILE__), "mongoid.yml")) Mongoid.from_hash(mongoid_config) end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
stratify-itunes-0.1.3 | spec/spec_helper.rb |
stratify-itunes-0.1.2 | spec/spec_helper.rb |
stratify-itunes-0.1.0 | spec/spec_helper.rb |