rspec/rspec-rails — pull request #852 by benhamill (2013-11-21 04:02:13+00:00)
Title: undefined method `full_messages' for Array

Imagine I have a class like this:

```ruby
class Foo
def valid?
false
end

def errors
['something is wrong.', 'i am afraid.']
end
end
```

This is a naive implementation, but you can imagine wanting to write this interface to a class.

I had unit tests that used the `be_valid` matcher on a class like this (from a gem). In normal RSpec, this works fine because it parsed off the `be_` part and calls `valid?`. However, with rspec-rails, it checks to see if there's an `errors` method, then assumes that it's something ActiveRecord-ey and calls `errors.full_messages`.

Would y'all accept a pull request that tightened that up so that it would still work with less robust validity-error reporting interface?