spec/spec_helper.rb in popolo-0.0.2 vs spec/spec_helper.rb in popolo-0.0.3

- old
+ new

@@ -1,10 +1,13 @@ require 'spork' Spork.prefork do ENV["RAILS_ENV"] ||= 'test' + require 'coveralls' + Coveralls.wear! + require 'rails/application' # Prevent Spork from caching the routes. Spork.trap_method(Rails::Application::RoutesReloader, :reload!) # Prevent Spork from caching Popolo classes (see below). Spork.trap_method(Rails::Application, :eager_load!) @@ -31,11 +34,10 @@ end end end require 'database_cleaner' - require 'factory_girl_rails' require 'mongoid-rspec' RSpec.configure do |config| config.include Mongoid::Matchers @@ -47,10 +49,11 @@ # http://railscasts.com/episodes/285-spork config.treat_symbols_as_metadata_keys_with_true_values = true config.run_all_when_everything_filtered = true config.filter_run focus: true + config.infer_spec_type_from_file_location! end end Spork.each_run do # DatabaseCleaner will not truncate system.indexes between tests, but it @@ -75,7 +78,9 @@ # Create dummy indexes. Rails::Mongoid.create_indexes(File.expand_path("../dummy/app/models/**/*.rb", __FILE__)) # @todo I18n.backend.reload! + + require 'factory_girl_rails' FactoryGirl.reload end