Sha256: c4d374f3b9a1d8f2673b11b2b1b9420ede6183761487142d7f9eb3ba0ee7fcee

Contents?: true

Size: 772 Bytes

Versions: 19

Compression:

Stored size: 772 Bytes

Contents

ENV["RAILS_ENV"] ||= "test"
require File.expand_path("../../../spec/dummy/config/environment.rb",  __FILE__)
ENV["RAILS_ROOT"] ||= File.dirname(__FILE__) + "../../../spec/dummy"

require 'cucumber/rails'
require_relative "../../spec/support/migrations"

ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../../')


Before do
  TestDb.up
  Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
end

After do
  [Document, Section, Chapter, User, ActiveMetadata::Note,
   ActiveMetadata::Watcher, ActiveMetadata::Attachment, ActiveMetadata::History].each do |i|
    i.delete_all
  end
  FileUtils.remove_dir File.expand_path('public/system/') if Dir.exist?(File.expand_path('public/system/'))
  Rails.cache.clear
end

at_exit do
  TestDb.down
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
active_metadata-0.8.9 features/support/env.rb
active_metadata-0.8.8 features/support/env.rb
active_metadata-0.8.7.1 features/support/env.rb
active_metadata-0.8.7 features/support/env.rb
active_metadata-0.8.6 features/support/env.rb
active_metadata-0.8.5.2 features/support/env.rb
active_metadata-0.8.5.1 features/support/env.rb
active_metadata-0.8.5 features/support/env.rb
active_metadata-0.8.4 features/support/env.rb
active_metadata-0.8.3.1 features/support/env.rb
active_metadata-0.8.3 features/support/env.rb
active_metadata-0.8.2 features/support/env.rb
active_metadata-0.8.1 features/support/env.rb
active_metadata-0.8.0 features/support/env.rb
active_metadata-0.7.9 features/support/env.rb
active_metadata-0.7.8 features/support/env.rb
active_metadata-0.7.7 features/support/env.rb
active_metadata-0.7.6 features/support/env.rb
active_metadata-0.7.5 features/support/env.rb