Sha256: 08504b1638580732f2100fec521d4b24af43d8480a9585a88f543042676ec434

Contents?: true

Size: 906 Bytes

Versions: 12

Compression:

Stored size: 906 Bytes

Contents

if ENV['COVERAGE']
	begin
		require 'simplecov'
		
		SimpleCov.start do
			add_filter "/spec/"
		end
		
		if ENV['TRAVIS']
			require 'coveralls'
			Coveralls.wear!
		end
	rescue LoadError
		warn "Could not load simplecov: #{$!}"
	end
end

require "bundler/setup"
require "trenni"

begin
	require 'ruby-prof'
	
	RSpec.shared_context "profile" do
		before(:all) do
			RubyProf.start
		end
		
		after(:all) do
			result = RubyProf.stop
			
			# Print a flat profile to text
			printer = RubyProf::FlatPrinter.new(result)
			printer.print(STDOUT)
		end
	end
rescue LoadError
	RSpec.shared_context "profile" do
		before(:all) do
			puts "Profiling not supported on this platform."
		end
	end
end

RSpec.configure do |config|
	# Enable flags like --only-failures and --next-failure
	config.example_status_persistence_file_path = ".rspec_status"

	config.expect_with :rspec do |c|
		c.syntax = :expect
	end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
trenni-3.6.1 spec/spec_helper.rb
trenni-3.6.0 spec/spec_helper.rb
trenni-3.5.0 spec/spec_helper.rb
trenni-3.4.0 spec/spec_helper.rb
trenni-3.3.0 spec/spec_helper.rb
trenni-3.2.0 spec/spec_helper.rb
trenni-3.1.3 spec/spec_helper.rb
trenni-3.1.2 spec/spec_helper.rb
trenni-3.1.1 spec/spec_helper.rb
trenni-3.1.0 spec/spec_helper.rb
trenni-3.0.4 spec/spec_helper.rb
trenni-3.0.3 spec/spec_helper.rb