Sha256: eb9f9d53cf1861d0934f052935ed38102bbbbdd36e8a8bd1c1b6e8c4728b0726
Contents?: true
Size: 1.02 KB
Versions: 9
Compression:
Stored size: 1.02 KB
Contents
require File.join(File.dirname(__FILE__), '..', 'myapp.rb') $: << APP_ROOT # for model reloading require 'rack/test' require 'rspec' require 'timecop' # set test environment set :environment, :test set :run, false set :raise_errors, true set :logging, false module RSpecMixinExample include Rack::Test::Methods def app @app ||= Sinatra::Application end end Rspec.configure do |config| config.send(:include, RSpecMixinExample) config.send(:include, ::Sorcery::TestHelpers::Internal) config.send(:include, ::Sorcery::TestHelpers::Internal::Sinatra) config.before(:suite) do ActiveRecord::Migrator.migrate("#{APP_ROOT}/db/migrate/core") end config.after(:suite) do ActiveRecord::Migrator.rollback("#{APP_ROOT}/db/migrate/core") end end # needed when running individual specs require File.join(File.dirname(__FILE__), '..','user') require File.join(File.dirname(__FILE__), '..','authentication') class TestUser < ActiveRecord::Base authenticates_with_sorcery! end class TestMailer < ActionMailer::Base end
Version data entries
9 entries across 9 versions & 1 rubygems