Sha256: ff0a3937b2a09698de9dcaf05af4e681b0f5447d126c988b764f1caa8c6c9c32

Contents?: true

Size: 876 Bytes

Versions: 15

Compression:

Stored size: 876 Bytes

Contents

require 'rubygems'

# Set environment to test
ENV['RACK_ENV'] = 'test'
ROOT_PATH = File.expand_path(File.join(File.dirname(__FILE__),'..'))
Bundler.require(:default, ENV['RACK_ENV'].to_sym)

# Try to load vendor-ed rhoconnect, otherwise load the gem
begin
  require 'vendor/rhoconnect/lib/rhoconnect'
rescue LoadError
  require 'rhoconnect'
end

$:.unshift File.join(File.dirname(__FILE__), "..")
include Rhoconnect
require 'rhoconnect/application/init'
require 'rhoconnect/test_methods'

shared_examples "SpecHelper" do
  include Rhoconnect::TestMethods

  before(:each) do
    Store.create
    Store.flush_all
    Rhoconnect.bootstrap(ROOT_PATH)

    # setup server's test settings
    Rhoconnect::Server.set :environment, :test
    Rhoconnect::Server.set :run, false
    Rhoconnect::Server.set :use_async_model, false
    Rhoconnect::Server.set :secret, "secure!"
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rhoconnect-7.6.0 generators/templates/application/spec/spec_helper.rb
rhoconnect-7.5.1 generators/templates/application/spec/spec_helper.rb
rhoconnect-7.4.1 generators/templates/application/spec/spec_helper.rb
rhoconnect-7.1.17 generators/templates/application/spec/spec_helper.rb
rhoconnect-6.2.0 generators/templates/application/spec/spec_helper.rb
rhoconnect-6.0.11 generators/templates/application/spec/spec_helper.rb
rhoconnect-5.5.18 generators/templates/application/spec/spec_helper.rb
rhoconnect-5.5.17 generators/templates/application/spec/spec_helper.rb
rhoconnect-5.5.15 generators/templates/application/spec/spec_helper.rb
rhoconnect-5.5.0.22 generators/templates/application/spec/spec_helper.rb
rhoconnect-5.5.2 generators/templates/application/spec/spec_helper.rb
rhoconnect-5.5.0.7 generators/templates/application/spec/spec_helper.rb
rhoconnect-5.5.0.3 generators/templates/application/spec/spec_helper.rb
rhoconnect-5.5.0 generators/templates/application/spec/spec_helper.rb
rhoconnect-5.1.1 generators/templates/application/spec/spec_helper.rb