Sha256: 08f5ff9c0983b9f556c1111ac23ea734165b303c0fbdc51568a32cf3e88a4546

Contents?: true

Size: 828 Bytes

Versions: 2

Compression:

Stored size: 828 Bytes

Contents

require 'minitest-spec-rails'
require 'minitest/mock'
require 'minitest/pride'
require 'database_cleaner'

# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

Rails.backtrace_cleaner.remove_silencers!

DatabaseCleaner.strategy = :transaction
DatabaseCleaner.clean_with :truncation
Dragonfly.app.use_datastore :memory

class ActiveSupport::TestCase
  # Due to test weirdness / dodgy code need to reference some classes
  Page && Category

  before :each do
    DatabaseCleaner.start
    PushType.config.root_nodes = :all
    PushType.config.unexposed_nodes = []
  end

  after :each do
    DatabaseCleaner.clean
  end
  # Add more helper methods to be used by all tests here...
end

class ActionController::TestCase
  before :each do
    @routes = PushType::Core::Engine.routes
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
push_type_core-0.6.0.beta.2 lib/push_type/testing/setup.rb
push_type_core-0.6.0.beta.1 lib/push_type/testing/setup.rb