thoughtbot/shoulda-matchers — pull request #588 by seanpdoyle (2014-09-21 22:19:50+00:00)
Title: Improve failure message when `has_many` is missing

When test driving, writing an expectation such as

```ruby
it { should have_many(:children).through(:relationships).source(:child) }
```

used to provide the not-so-helpful error message

```
Failure/Error: it { should have_many(:children).through(:relationships).source(:child) }

NoMethodError:

undefined method `options' for nil:NilClass
```

The improved error message is

```
Expected Parent to have a has_many association called children (no association
called children, children does not have any relationship to relationships,
children should have child as source option)
```