Sha256: c11dc8a0786729509996de998e91d35cc7cdef2acf09b2ed1a5342d96c4df44c

Contents?: true

Size: 778 Bytes

Versions: 5

Compression:

Stored size: 778 Bytes

Contents

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
# load Rails first
require 'rails'
require 'active_decorator'
# needs to load the app before loading rspec/rails => capybara
require 'fake_app/fake_app'
require 'rspec/rails'
# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}

RSpec.configure do |config|
  config.expect_with :rspec do |c|
    c.syntax = [:should, :expect]
  end

  config.before :all do
    CreateAllTables.up unless ActiveRecord::Base.connection.table_exists? 'authors'
  end
  config.before :each do
    Book.delete_all
    Author.delete_all
    Movie.delete_all
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
active_decorator-0.5.3 spec/spec_helper.rb
active_decorator-0.5.2 spec/spec_helper.rb
active_decorator-0.5.1 spec/spec_helper.rb
active_decorator-0.5.0 spec/spec_helper.rb
active_decorator-0.4.0 spec/spec_helper.rb