spec/spec_helper.rb in shamu-0.0.1 vs spec/spec_helper.rb in shamu-0.0.2
- old
+ new
@@ -1,16 +1,20 @@
-require 'simplecov'
-if ENV['COVERAGE']
+require "simplecov"
+if ENV[ "COVERAGE" ]
require "codeclimate-test-reporter"
CodeClimate::TestReporter.start
else
SimpleCov.start
end
-require 'pry'
-require 'bundler/setup'
+require "pry"
+require "bundler/setup"
-require 'shamu'
+require "shamu"
+require "shamu/rspec"
+require "scorpion/rspec"
+require "rspec/wait"
+require "rspec/its"
root_path = File.expand_path( "../..", __FILE__ )
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
@@ -18,18 +22,19 @@
RSpec.configure do |config|
config.order = "random"
+ config.filter_gems_from_backtrace "activesupport", "actionpack", "actionview", "scorpion-ioc", "rspec-wait"
+
config.filter_run focus: true
config.filter_run_excluding :broken => true
config.run_all_when_everything_filtered = true
- config.before(:each) { GC.disable }
- config.after(:each) { GC.enable }
+ config.include Scorpion::Rspec::Helper
+ config.extend Support::ActiveRecord
- config.before( :each, type: :model ) do
- [ Todo, Author ].each do |model|
- model.destroy_all
- end
+ config.before(:all) do
+ Shamu::Security.private_key = SecureRandom.base64( 128 )
end
-end
\ No newline at end of file
+
+end