File: spec_helper.rb

package info (click to toggle)
ruby-acts-as-api 0.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 932 kB
  • ctags: 160
  • sloc: ruby: 2,535; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 643 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
ENV["RAILS_ENV"] = "test"

if ENV['ACTS_AS_API_ORM'] == 'active_record'
  require "active_record_dummy/config/environment"

  load_schema = lambda {
    load "#{Rails.root.to_s}/db/schema.rb" # use db agnostic schema by default
    # ActiveRecord::Migrator.up('db/migrate') # use migrations
  }
  silence_stream(STDOUT, &load_schema)

elsif ENV['ACTS_AS_API_ORM'] == 'mongoid'

  require "mongoid_dummy/config/environment"

end

require 'rspec/rails'

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|file| require file }