Sha256: 9392846bbef12df8c67fcd4f9f0c83020b5bdb2e4898cb25cfb65bca99f4e23a
Contents?: true
Size: 1.15 KB
Versions: 2
Compression:
Stored size: 1.15 KB
Contents
require 'simplecov' SimpleCov.start 'rails' ENV['RAILS_ENV'] ||= 'test' require File.expand_path('../dummy/config/environment.rb', __FILE__) require 'rspec/rails' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } RSpec.configure do |config| # ## Mock Framework # # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line: # # config.mock_with :mocha # config.mock_with :flexmock # config.mock_with :rr # If true, the base class of anonymous controllers will be inferred # automatically. This will be the default behavior in future versions of # rspec-rails. config.infer_base_class_for_anonymous_controllers = false config.before :suite do Mongoid.configure do |config| config.master = Mongo::Connection.new.db('media_magick') end end config.after :each do Mongoid.master.collections.select { |c| c.name !~ /^system/ }.each(&:drop) end config.after :suite do Mongoid.master.connection.drop_database('media_magick') Mongoid.master.connection.close end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
media_magick-0.1.0 | spec/spec_helper.rb |
media_magick-0.0.1 | spec/spec_helper.rb |