yellow5/foreigner-matcher — pull request #7 by woods (2014-07-05 11:27:25+00:00)
Title: Support for RSpec 3.0

This fixes deprecation warnings that appear in this gem's specs and in your application's specs if you run your tests using RSpec 3.0. Examples:

```
--------------------------------------------------------------------------------
ForeignerMatcher::HaveForeignKeyFor implements a legacy RSpec matcher
protocol. For the current protocol you should expose the failure messages
via the `failure_message` and `failure_message_when_negated` methods.
(Used from foreigner-matcher/spec/test_models/comment_spec.rb:26:in
`block (3 levels) in ')
--------------------------------------------------------------------------------
```

```
Using `should` from rspec-expectations' old `:should` syntax without explicitly
enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly
enable `:should` instead.
Called from foreigner-matcher/spec/foreigner_matcher_spec.rb:9:in
`block (4 levels) in '.
```

I did not update the `Gemfile` to explicitly bump the version of RSpec up to 3.0. But I did try this code against both 2.x and 3.x to verify that it was compatible with both. You could also consider expanding the version requirement in the `Gemfile` to this:

```diff
diff --git a/Gemfile b/Gemfile
index bfd2723..5d89827 100644
--- a/Gemfile
+++ b/Gemfile
@@ -13,7 +13,7 @@ end

group :test do
gem "rake"
- gem "rspec", "~> 2.14.0"
+ gem "rspec", ">= 2.14.0"
gem "mocha", "~> 1.1.0"
gem "activerecord", "~> 4.1.0"
gem "railties", "~> 4.1.0"
```