Sha256: 2a9830fd6614a03b5c0fb130af41149f597bbce3627789361641e0402253e34d

Contents?: true

Size: 1.05 KB

Versions: 9

Compression:

Stored size: 1.05 KB

Contents

# Track code coverage
require 'simplecov'
SimpleCov.start 'rails' do
  # root "dummy/"
  # add_filter "/factories/"
end

# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] = 'test'
require File.expand_path("../dummy/config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
require 'database_cleaner'
require 'shoulda'
require 'factory_girl'
require 'mocha'

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb"), File.join(ENGINE_RAILS_ROOT,"spec/factories/*")].each {|f| require f}

RSpec.configure do |config|
  config.mock_with :mocha
  config.use_transactional_fixtures = true
  config.infer_base_class_for_anonymous_controllers = false

  config.before(:suite) do
    DatabaseCleaner.strategy = :truncation
  end
  config.before(:each) do
    DatabaseCleaner.start
  end
  config.after(:each) do
    DatabaseCleaner.clean
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
tb_blog-1.3.0.beta1 spec/spec_helper.rb
tb_blog-1.2.1 spec/spec_helper.rb
tb_blog-1.2.0 spec/spec_helper.rb
tb_blog-1.1.3 spec/spec_helper.rb
tb_blog-1.1.2 spec/spec_helper.rb
tb_blog-1.1.1 spec/spec_helper.rb
tb_blog-1.1.0 spec/spec_helper.rb
tb_blog-1.0.4 spec/spec_helper.rb
tb_blog-1.0.3 spec/spec_helper.rb