Sha256: a0faaaaafa972c9506f87a07b5e85d0cdce0fa3676f0f239489368a19e44f141

Contents?: true

Size: 908 Bytes

Versions: 2

Compression:

Stored size: 908 Bytes

Contents

# Configure Rails Envinronment
ENV["RAILS_ENV"] = "test"

require 'shortener'
require File.expand_path("../dummy/config/environment.rb",  __FILE__)
require 'rspec/rails'
require 'shoulda/matchers'
require 'byebug'
require 'faker'
require 'capybara/rspec'

Rails.backtrace_cleaner.remove_silencers!
ActiveRecord::Base.logger = Logger.new(STDOUT) if ENV['LOG_STDOUT']

Shoulda::Matchers.configure do |config|
  config.integrate do |with|
    with.test_framework :rspec
    with.library :rails
  end
end

# Run any available migration
migration_path = File.expand_path("../dummy/db/migrate/", __FILE__)
if ActiveRecord::Migrator.respond_to?(:migrate)
  ActiveRecord::Migrator.migrate(migration_path)
elsif Rails::VERSION::MAJOR < 6
  ActiveRecord::MigrationContext.new(migration_path).migrate
else
  ActiveRecord::MigrationContext.new(migration_path, ActiveRecord::Base.connection.schema_migration).migrate
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shortener-1.0.1 spec/spec_helper.rb
shortener-1.0.0 spec/spec_helper.rb