Skip to content
This repository
Browse code

use NullObject instead of double for rspec's own specs

  • Loading branch information...
commit a897e61617dd1dbd04ea977b5e98ce294b06362b 1 parent 8b497c5
David Chelimsky dchelimsky authored

Showing 1 changed file with 7 additions and 2 deletions. Show diff stats Hide diff stats

  1. +7 2 spec/spec_helper.rb
9 spec/spec_helper.rb
@@ -30,10 +30,15 @@ def fail_with(message)
30 30 end
31 31 end
32 32
  33 +class NullObject
  34 + def method_missing(method, *args, &block)
  35 + # ignore
  36 + end
  37 +end
  38 +
33 39 class RSpec::Core::ExampleGroup
34   - include RSpec::Matchers
35 40 def self.run_all(reporter=nil)
36   - run(reporter || RSpec::Mocks::Mock.new('reporter').as_null_object)
  41 + run(reporter || NullObject.new)
37 42 end
38 43 end
39 44

0 comments on commit a897e61

Please sign in to comment.
Something went wrong with that request. Please try again.