Permalink
Browse files

Fix infinite recursion SystemStackError on 1.9.2.

RSpec::Matchers#method_missing calls super, and it was supering to itself infinitely because RSpec::Matchers was being included multiple times.  rspec-core now takes care of including RSpec::Matchers on its as of this commit:

rspec/rspec-core@eefc972

- Closes #40.
  • Loading branch information...
1 parent f9ff542 commit 44909b0e689ddea51ba2cf11de6c8fd87d4ec333 @myronmarston myronmarston committed with dchelimsky Nov 7, 2010
Showing with 4 additions and 4 deletions.
  1. +0 −4 lib/rspec/matchers.rb
  2. +4 −0 spec/rspec/matchers/be_spec.rb
View
@@ -155,10 +155,6 @@ module RSpec
# end
#
module Matchers
- if RSpec.respond_to?(:configure)
- RSpec.configure {|c| c.include self}
- end
-
# Include Matchers for other test frameworks
if defined?(Test::Unit::TestCase)
Test::Unit::TestCase.send(:include, self)
@@ -1,6 +1,10 @@
require 'spec_helper'
describe "should be_predicate" do
+ it "allows other undefined methods to raise errors as normal" do
+ expect { some_undefined_method }.to raise_error(NameError)
+ end
+
it "passes when actual returns true for :predicate?" do
actual = stub("actual", :happy? => true)
actual.should be_happy

0 comments on commit 44909b0

Please sign in to comment.