Sha256: 8d38478040c893924a0e218e4b112a25d550f5d40892e61f21714548291ff16f

Contents?: true

Size: 1.6 KB

Versions: 15

Compression:

Stored size: 1.6 KB

Contents

require 'spork'

Spork.prefork do

  ENV["RAILS_ENV"] = "test"
  require File.expand_path("../dummy/config/environment.rb", __FILE__)
  require 'rspec/rails'
  require 'capybara/rspec'
  require 'capybara/rails'
  require 'machinist/active_record'
  require 'webmock/rspec'
  require 'pdf/toolkit'
  require 'timecop'


  Rails.backtrace_cleaner.remove_silencers!
  Rails.application.routes.mounted_helpers

  # Load support files
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

  RSpec.configure do |config|
    config.mock_with :rr
    #config.use_transactional_fixtures = true
    config.include Medivo::Engine.routes.url_helpers
    config.include Medivo::Spec
    config.before(:each) { Machinist.reset_before_test }
  end

  Capybara.register_driver :selenium_chrome do |app|
    Capybara::Selenium::Driver.new(app, :browser => :chrome)
  end

  class ActiveRecord::Base
    mattr_accessor :shared_connection
    @@shared_connection = nil

    def self.connection
      @@shared_connection || retrieve_connection
    end
  end
end

ENGINE_PATH = File.expand_path('../..',  __FILE__) unless defined? ENGINE_PATH
FIXTURE_PATH = File.expand_path('../../spec/fixtures', __FILE__) unless defined? FIXTURE_PATH
Spork.each_run do
  Dir["#{Rails.root}/app/**/*.rb"].each { |f| load f }
  load "#{Rails.root}/config/routes.rb"

  Dir["#{ENGINE_PATH}/app/**/*.rb"].each { |f| load f }
  Dir["#{ENGINE_PATH}/lib/support/**/*.rb"].each { |f| load f }
  Dir["#{ENGINE_PATH}/lib/pdf/**/*.rb"].each { |f| load f }
  load "#{ENGINE_PATH}/config/routes.rb"
  Dir["#{ENGINE_PATH}/spec/support/**/*.rb"].each { |f| load f }
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
medivo-0.2.24 spec/spec_helper.rb
medivo-0.2.21 spec/spec_helper.rb
medivo-0.2.20 spec/spec_helper.rb
medivo-0.2.19 spec/spec_helper.rb
medivo-0.2.18 spec/spec_helper.rb
medivo-0.2.17 spec/spec_helper.rb
medivo-0.2.16 spec/spec_helper.rb
medivo-0.2.15 spec/spec_helper.rb
medivo-0.2.14 spec/spec_helper.rb
medivo-0.2.13 spec/spec_helper.rb
medivo-0.2.12 spec/spec_helper.rb
medivo-0.2.11 spec/spec_helper.rb
medivo-0.2.10 spec/spec_helper.rb
medivo-0.2.9 spec/spec_helper.rb
medivo-0.2.8 spec/spec_helper.rb