Sha256: 44b5bff66188fc5b0a8d4897ad281c2840cfd48e6d01f11f8a4efe21fc0fd6d7

Contents?: true

Size: 1.05 KB

Versions: 33

Compression:

Stored size: 1.05 KB

Contents

require 'rubygems'

# Set environment to test
ENV['RHO_ENV'] = 'test'
ROOT_PATH = File.expand_path(File.join(File.dirname(__FILE__),'..'))
Bundler.require(:default, ENV['RHO_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__), "..") # FIXME:
# Load our rhoconnect application
require 'application'
include Rhoconnect

require 'rhoconnect/test_methods'

# Monkey patch to fix the following issue:
# /Library/Ruby/Gems/1.8/gems/rspec-core-2.5.1/lib/rspec/core/shared_example_group.rb:45:
# in `ensure_shared_example_group_name_not_taken': Shared example group '...' already exists (ArgumentError)
module RSpec
  module Core
    module SharedExampleGroup
    private
      def ensure_shared_example_group_name_not_taken(name)
      end
    end
  end
end

shared_examples_for "SpecHelper" do
  include Rhoconnect::TestMethods
  
  before(:each) do
    Store.db.flushdb
    Application.initializer(ROOT_PATH)
  end  
end

Version data entries

33 entries across 11 versions & 1 rubygems

Version Path
rhoconnect-3.1.0.beta1 generators/templates/application/spec/spec_helper.rb
rhoconnect-3.1.0.beta1 bench/blobapp/spec/spec_helper.rb
rhoconnect-3.1.0.beta1 bench/benchapp/spec/spec_helper.rb
rhoconnect-3.0.6 bench/benchapp/spec/spec_helper.rb
rhoconnect-3.0.6 generators/templates/application/spec/spec_helper.rb
rhoconnect-3.0.6 bench/blobapp/spec/spec_helper.rb
rhoconnect-3.0.5 generators/templates/application/spec/spec_helper.rb
rhoconnect-3.0.5 bench/blobapp/spec/spec_helper.rb
rhoconnect-3.0.5 bench/benchapp/spec/spec_helper.rb
rhoconnect-3.0.4 generators/templates/application/spec/spec_helper.rb
rhoconnect-3.0.4 bench/blobapp/spec/spec_helper.rb
rhoconnect-3.0.4 bench/benchapp/spec/spec_helper.rb
rhoconnect-3.0.3 bench/blobapp/spec/spec_helper.rb
rhoconnect-3.0.3 bench/benchapp/spec/spec_helper.rb
rhoconnect-3.0.3 generators/templates/application/spec/spec_helper.rb
rhoconnect-3.0.2 bench/blobapp/spec/spec_helper.rb
rhoconnect-3.0.2 bench/benchapp/spec/spec_helper.rb
rhoconnect-3.0.2 generators/templates/application/spec/spec_helper.rb
rhoconnect-3.0.1 bench/benchapp/spec/spec_helper.rb
rhoconnect-3.0.1 generators/templates/application/spec/spec_helper.rb