frodsan/mongoid-minitest — pull request #11 by chancancode (2012-08-13 08:19:53+00:00)
Title: Allow non-array values for inclusion/exclusion matchers

Say you have this model that you wanted to test...

```ruby
class Order
include Mongoid::Document
field :total, type: Integer
validates_inclusion_of :total, in: 0...10000000
end
```

Currently you'd need to write...

```ruby
describe Order do
subject { Order }
it { must validate_inclusion_of(:amount).to_allow((0...10000000).to_a) }
end
```
This is *extremely* slow.

This PR lets you do this instead:

```ruby
describe Order do
subject { Order }
it { must validate_inclusion_of(:amount).to_allow(0...10000000) }
end
```