Sha256: 2f3ff30b9017d0987413e65c12b6e758c9803908ba52630ca5e9be2d6d5724e6

Contents?: true

Size: 725 Bytes

Versions: 3

Compression:

Stored size: 725 Bytes

Contents

ENV['RACK_ENV'] = 'test'

require 'webmock/rspec'
require 'rack/test'
require 'gris/rspec_extensions/response_helpers'

require File.expand_path('../../config/application', __FILE__)

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir['./spec/support/**/*.rb'].each { |f| require f }

RSpec.configure do |config|
  config.include Gris::RspecExtensions::ResponseHelpers
  config.mock_with :rspec
  config.expect_with :rspec

  config.before(:suite) do
    ActiveRecord::Migration.maintain_test_schema!
    DatabaseCleaner.strategy = :transaction
    DatabaseCleaner.clean_with(:truncation)
  end

  config.before(:each) do
    DatabaseCleaner.clean
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gris-0.2.3 lib/gris/generators/templates/scaffold/spec/spec_helper.rb
gris-0.2.2 lib/gris/generators/templates/scaffold/spec/spec_helper.rb
gris-0.2.1 lib/gris/generators/templates/scaffold/spec/spec_helper.rb