norman/friendly_id — Issue #232: Using friendlyid breaks simple rspec spec in rails 3.2.1
Author: floydj
Created: 2012-02-21 16:49:32+00:00
State: open

Rails 3.2.1
Ruby 1.9.3-p125
friendly_id 4.0.0
rspec 2.8.0

I have the following spec that fails in rails 3.2.1:

```ruby
it "can be shown on the company menu" do
liberry = FactoryGirl.create(:document_library, title: 'Test', menu: false, company: true)
liberry.should be_valid
end
```

Here's the model:

```ruby
class DocumentLibrary < ActiveRecord::Base
has_many :shelves, :dependent => :destroy
has_many :documents, :through => :shelves
validates :title, presence: true, uniqueness: true
default_scope order: :title

extend FriendlyId
friendly_id :title, :use => :slugged
end
```

If I comment out the last two lines of the model, the spec passes fine. If I add the friendly_id stuff back in, the spec fails.

This spec passed fine with friendly_id in rails 3.2.0, but will not work in 3.2.1. I have no idea why.