digitalplaywright/mongoid-slug — pull request #163 by johnnyshields (2014-05-16 05:56:50+00:00)
Title: Avoid scope error in tests (Mongoid 4)

Mongoid 4 throws the following error when running specs. This PR only modifies the specs to fix it. Verified it works on Mongoid 3 as well.

```
/lib/mongoid/scopable.rb:306:in `check_scope_validity': (Mongoid::Errors::InvalidScope)
Problem:
Defining a scope of value # on Page is not allowed.
Summary:
Scopes in Mongoid must be procs that wrap criteria objects.
Resolution:
Change the scope to be a proc wrapped critera.

Example:
class Band
include Mongoid::Document
scope :inactive, ->{ where(active: false) }
end
```