Sha256: 5ca417e7c7dfade207df3bacaeb1a920f61fd8e212f62002880927393957d426

Contents?: true

Size: 795 Bytes

Versions: 2

Compression:

Stored size: 795 Bytes

Contents

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
$LOAD_PATH.unshift(File.dirname(__FILE__))
ENV["RAILS_ENV"] ||= "test"

require "rails"

if Rails::VERSION::MAJOR < 4 || Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR < 2
  raise "Sorry, influxdb-rails only supports Rails 4.2 and higher."
end

require "bundler/setup"
Bundler.require

require "fakeweb"
FakeWeb.allow_net_connect = false

puts "Loading Rails v#{Rails.version}..."

require "support/rails#{Rails::VERSION::MAJOR}/app"
require "rspec/rails"

require "pry"

RSpec.configure do |config|
  # use expect syntax
  config.disable_monkey_patching!

  # reset configuration for each spec
  config.before :each do
    InfluxDB::Rails.instance_variable_set :@configuration, nil
    InfluxDB::Rails.configure
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
influxdb-rails-1.0.0 spec/spec_helper.rb
influxdb-rails-1.0.0.beta4 spec/spec_helper.rb