Sha256: 2a4d3cc91737f515b02b097586e7383835838943034cc8bc75afc65740afb7b0

Contents?: true

Size: 1.16 KB

Versions: 6

Compression:

Stored size: 1.16 KB

Contents

require 'simplecov'
SimpleCov.start

require 'rails'
require 'resque'
require 'rubygems'
require 'bundler'
require 'active_record'
require 'net/http'

#require acts_as_cleo

require File.dirname(__FILE__) + '/../lib/acts_as_cleo'

begin
  Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
  $stderr.puts e.message
  $stderr.puts "Run `bundle install` to install missing gems"
  exit e.status_code
end
require 'test/unit'
require 'shoulda'


file_dirname = File.dirname(__FILE__)

#Load Lib
$LOAD_PATH.unshift(File.join(file_dirname, '..', 'lib'))
$LOAD_PATH.unshift file_dirname

#Load sqlilte for testing
sqlite = File.join(file_dirname, 'db', 'connection', 'sqlite')
require sqlite

#Load Database Cleaner
require 'database_cleaner'
DatabaseCleaner[:active_record].strategy = :truncation

# Load Models
models_dir = File.join(file_dirname, 'models')
Dir[ models_dir + '/*.rb'].each { |m| require m }

server_config = {:url => "http://localhost:8080/cleo-primer/", :run_async => false}
Cleo::Server.configure server_config

class Test::Unit::TestCase
  def setup
    DatabaseCleaner.clean
  end

  def teardown
    Book.destroy_all
    Movie.destroy_all
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
acts_as_cleo-2.4.5 test/helper.rb
acts_as_cleo-2.4.4 test/helper.rb
acts_as_cleo-2.4.3 test/helper.rb
acts_as_cleo-2.4.2 test/helper.rb
acts_as_cleo-2.4.1 test/helper.rb
acts_as_cleo-2.4.0 test/helper.rb