Sha256: ffc86967b7e9e8fa0f4a5cf7116128080f5fa049b2e302ecdce89b3cad1ff00a

Contents?: true

Size: 1.25 KB

Versions: 2

Compression:

Stored size: 1.25 KB

Contents

require 'pry'
require 'pry-nav'
require "mailcannon"
require 'rspec'
require 'rspec/mocks'
require 'rspec/expectations'
require "pathname"
require 'database_cleaner'
require 'factory_girl'
require 'vcr'
require 'webmock'
require 'webmock/rspec'

SPECDIR = Pathname.new(File.dirname(__FILE__))
TMPDIR = SPECDIR.join("tmp")

Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|r| require r}
Dir[File.dirname(__FILE__) + "/factories/**/*.rb"].each {|r| require r}

RSpec.configure do |config|
  config.treat_symbols_as_metadata_keys_with_true_values = true
  config.order = :random
  config.include FactoryGirl::Syntax::Methods
  config.before { FileUtils.mkdir_p(TMPDIR) }
  config.mock_with :rspec
  
  config.before(:suite) do
    DatabaseCleaner.clean_with(:truncation)
    DatabaseCleaner.strategy = :truncation
  end

  config.around(:each) do |example|
    DatabaseCleaner[:mongoid].strategy = :truncation
    DatabaseCleaner.strategy = :truncation
    DatabaseCleaner.start
    example.run
    DatabaseCleaner.clean
  end
  WebMock.disable_net_connect!
end

VCR.configure do |c|
  c.cassette_library_dir = 'spec/fixtures/cassettes'
  c.hook_into :webmock
  c.allow_http_connections_when_no_cassette = false
end

Mongoid.load!("spec/support/mongoid.yml", ENV['RACK_ENV'])

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mailcannon-0.0.3 spec/spec_helper.rb
mailcannon-0.0.2 spec/spec_helper.rb