evansagge/mongoid-rspec — Issue #58: LocalJumpError when testing for unique indexes
Author: ekampp
Created: 2012-02-19 07:17:50+00:00
State: open

When testing for a unique index on a model, way the title on an article I get this error:

LocalJumpError:
no block given (yield)

This is coming from this line in my `article_spec.rb` file:

it { should have_index_for(:title).with_options(unique: true) }

I looked around google, but there is very little. Some fixed it by installing should (I guess for sqlite3, not(!) mongoid).