Sha256: 3e89d8dedea8a6587239c8f62666e63a4763a47b9fa82511559e332f94b75ade

Contents?: true

Size: 1.24 KB

Versions: 30

Compression:

Stored size: 1.24 KB

Contents

ENV['RAILS_ENV'] ||= 'test'
require 'rspec'
require 'pry'
require 'timecop'
require 'active_support/notifications'

begin
  require 'rails'
  Dir[File.expand_path(File.join(File.dirname(__FILE__), 'support/rails','*.rb'))].each {|f| require f}
  puts 'Rails present, running Rails specific specs'
  RAILS_PRESENT = true
rescue LoadError
  puts 'Rails not present, skipping Rails specific specs'
  RAILS_PRESENT = false
end

def rails_present?
  RAILS_PRESENT
end

require 'appsignal'

Dir[File.expand_path(File.join(File.dirname(__FILE__), 'support/helpers','*.rb'))].each {|f| require f}

def tmp_dir
  @tmp_dir ||= File.expand_path(File.join(File.dirname(__FILE__), 'tmp'))
end

def fixtures_dir
  @fixtures_dir ||= File.expand_path(File.join(File.dirname(__FILE__), 'support/fixtures'))
end

RSpec.configure do |config|
  config.include ConfigHelpers
  config.include NotificationHelpers
  config.include TransactionHelpers

  config.before do
    ENV['PWD'] = File.expand_path(File.join(File.dirname(__FILE__), '../'))
    ENV['RAILS_ENV'] = 'test'
    ENV.delete('APPSIGNAL_PUSH_API_KEY')
    ENV.delete('APPSIGNAL_API_KEY')
  end

  config.after do
    FileUtils.rm_f(File.join(project_fixture_path, 'log/appsignal.log'))
    Appsignal.logger = nil
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
appsignal-0.8.15 spec/spec_helper.rb
appsignal-0.8.14 spec/spec_helper.rb
appsignal-0.8.13 spec/spec_helper.rb
appsignal-0.8.12 spec/spec_helper.rb
appsignal-0.8.11 spec/spec_helper.rb
appsignal-0.8.10 spec/spec_helper.rb
appsignal-0.8.8 spec/spec_helper.rb
appsignal-0.8.7 spec/spec_helper.rb
appsignal-0.8.7.alpha.1 spec/spec_helper.rb
appsignal-0.8.6 spec/spec_helper.rb
appsignal-0.8.6.beta.1 spec/spec_helper.rb
appsignal-0.8.6.beta.0 spec/spec_helper.rb
appsignal-0.8.5 spec/spec_helper.rb
appsignal-0.8.4 spec/spec_helper.rb
appsignal-0.8.4.beta.1 spec/spec_helper.rb
appsignal-0.8.4.beta.0 spec/spec_helper.rb
appsignal-0.8.3 spec/spec_helper.rb
appsignal-0.8.3.beta.1 spec/spec_helper.rb
appsignal-0.8.3.beta.0 spec/spec_helper.rb
appsignal-0.8.2 spec/spec_helper.rb