2011-02-05 13:32:10 +00:00
|
|
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
|
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2011-02-05 13:54:09 +00:00
|
|
|
require 'rails'
|
2011-02-18 03:33:56 +00:00
|
|
|
require 'mongoid'
|
2011-02-05 13:32:10 +00:00
|
|
|
require 'kaminari'
|
|
|
|
|
2011-02-11 15:07:26 +00:00
|
|
|
require File.join(File.dirname(__FILE__), 'fake_app')
|
2011-02-05 13:54:09 +00:00
|
|
|
|
2011-02-08 01:05:19 +00:00
|
|
|
require 'rspec/rails'
|
2011-02-05 13:32:10 +00:00
|
|
|
# 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|
|
2011-02-05 13:54:09 +00:00
|
|
|
config.mock_with :rr
|
|
|
|
config.before :all do
|
|
|
|
# ActiveRecord::Base.connection.execute 'CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))' unless ActiveRecord::Base.connection.table_exists? 'users'
|
2011-02-11 15:07:26 +00:00
|
|
|
CreateAllTables.up unless ActiveRecord::Base.connection.table_exists? 'users'
|
2011-02-05 13:54:09 +00:00
|
|
|
end
|
2011-02-05 13:32:10 +00:00
|
|
|
end
|