Skip to content

Commit

Permalink
Update to recommended rspec 3 settings.
Browse files Browse the repository at this point in the history
There is still some work to be done for a few things.
  • Loading branch information
myronmarston committed Mar 25, 2014
1 parent 035da09 commit fb120c7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .rspec
@@ -1,3 +1,2 @@
--color
--format documentation
--order random
--require spec_helper
27 changes: 17 additions & 10 deletions spec/spec_helper.rb
@@ -1,7 +1,4 @@
require_relative '../config/setup_load_paths'
if RUBY_ENGINE == 'ruby' && !ENV['TRAVIS']
require 'debugger'
end

RSpec::Matchers.define :have_enqueued_waiting_jobs_for do |*klasses|
match do |_|
Expand Down Expand Up @@ -46,20 +43,30 @@ def step_class(name, &block)
end

RSpec.configure do |config|
config.treat_symbols_as_metadata_keys_with_true_values = true
# config.expose_dsl_globally = false
config.filter_run :focus
config.run_all_when_everything_filtered = true
config.filter_run :f
config.alias_example_to :fit, :f
config.include PlinesSpecHelpers
config.extend PlinesSpecHelpers::ClassMethods

if config.files_to_run.one?
config.full_backtrace = true
config.formatter = 'doc' if config.formatters.none?
end

config.profile_examples = 10
config.order = :random
Kernel.srand config.seed

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

config.mock_with :rspec do |c|
c.yield_receiver_to_any_instance_implementation_blocks = true
config.mock_with :rspec do |mocks|
mocks.syntax = :expect
# mocks.verify_partial_doubles = true
end

config.include PlinesSpecHelpers
config.extend PlinesSpecHelpers::ClassMethods
end

redis_url = if File.exist?('./config/redis_connection_url.txt')
Expand Down

0 comments on commit fb120c7

Please sign in to comment.