rspec/rspec-expectations — Issue #108: Where Rspec 2.8 broke things
Author: dnagir
Created: 2012-01-12 01:47:12+00:00
State: open

I finally found why I could not run some of the specs on neo4j.rb project with RSpec 2.8 (it worked with 2.6).

Here is the issue: https://github.com/dnagir/rspec-rails-matchers/commit/89e4843f11d2356413f696f8ed6a999ed9418f1f#L1L5

The matcher DSL had some incompatible changes.

With the Rspec 2.6 it works, but with 2.8 gives the error:

```shell
> b/rspec spec/rails/validations/uniqueness_spec.rb --backtrace
Run options: exclude {:identity_map=>true, :edition=>#}
...........................................................................................F..

Failures:

1) Case sensitivity should allow presence validation with case insensitive propeties
Failure/Error: CaseInsensitiveWithNilTest.new.should validate_presence_of :required
ArgumentError:
wrong number of arguments (2 for 1)
# ./spec/rails/validations/uniqueness_spec.rb:216:in `Validations'

Finished in 8.59 seconds
94 examples, 1 failure
```

This error happens calling `match` in the matcher DSL with 2 arguments instead of 1.

**Current workaround**: rewrite everything using classes. But we can't rewrite myriad of all gems out there.
I think I also had this issue with couple others too.

I suppose it should not have broken here.