Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use NullObject instead of double for rspec's own specs

  • Loading branch information...
commit a897e61617dd1dbd04ea977b5e98ce294b06362b 1 parent 8b497c5
@dchelimsky dchelimsky authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 spec/spec_helper.rb
View
9 spec/spec_helper.rb
@@ -30,10 +30,15 @@ def fail_with(message)
end
end
+class NullObject
+ def method_missing(method, *args, &block)
+ # ignore
+ end
+end
+
class RSpec::Core::ExampleGroup
- include RSpec::Matchers
def self.run_all(reporter=nil)
- run(reporter || RSpec::Mocks::Mock.new('reporter').as_null_object)
+ run(reporter || NullObject.new)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.