thoughtbot/shoulda-matchers — Issue #37: should fail if with_options is incorrect on have_db_column
Author: nicholasmott
Created: 2011-11-24 02:06:52+00:00
State: open

Found this issue by accident.

If I misspell an option in the `have_db_column` test the test will still pass.

For example:

```ruby
it { should have_db_column(:time_zone).of_type(:string).with_options(:defult => "Melbourne") }
```

Will pass even though "default" is spelt incorrectly as "defult". I stepped through the code and the `with_options` function only assigns if the spelling is correct, otherwise it will ignore the `with_options` parameters as if none had been specified.

I assume that there should be a line here that would error if an option is passed that does not match any of the standard options.

I'm fairly new to both Rails and programming and don't feel confident in doing a pull request to solve this, but hope it will help someone else do so.

Cheers.