Sha256: 4039c15d69b442f506c097e3a99e7ce7dd9c5168e44d0ee46fde1d093462d760

Contents?: true

Size: 1.06 KB

Versions: 6

Compression:

Stored size: 1.06 KB

Contents

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'rails'
require 'mongoid'
require 'kaminari'
# Ensure we use 'syck' instead of 'psych' in 1.9.2
# RubyGems >= 1.5.0 uses 'psych' on 1.9.2, but
# Psych does not yet support YAML 1.1 merge keys.
# Merge keys is often used in mongoid.yml
# See: http://redmine.ruby-lang.org/issues/show/4300
if RUBY_VERSION >= '1.9.2'
  YAML::ENGINE.yamler = 'syck'
end
require File.join(File.dirname(__FILE__), '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.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'
    CreateAllTables.up unless ActiveRecord::Base.connection.table_exists? 'users'
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
zhanghd_kaminari-0.10.4.1 spec/spec_helper.rb
kaminari-0.10.4 spec/spec_helper.rb
kaminari-0.10.3 spec/spec_helper.rb
kaminari-0.10.2 spec/spec_helper.rb
kaminari-0.10.1 spec/spec_helper.rb
kaminari-0.10.0 spec/spec_helper.rb