Sha256: 67b72fa994952b55c1b05783f4f0d54de4c984d197b9b65a6cbc5b29b6c6b71f
Contents?: true
Size: 1.22 KB
Versions: 6
Compression:
Stored size: 1.22 KB
Contents
ENV['RAILS_ENV'] ||= 'test' require 'rspec' require 'pry' 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
6 entries across 6 versions & 1 rubygems