thoughtbot/shoulda-matchers — Issue #68: var in setup drops his value
Author: linuxonrails
Created: 2012-03-07 17:44:29+00:00
State: open

Hi!
I have a strange problem with @vars in functional tests with shoulda

```ruby
require 'test_helper'

class ItemsControllerTest < ActionController::TestCase
context "getting index" do
setup do
@item = Factory(:item, Titulo: 'Fe en el Caos, Darren Aranofskky')
get :index
end
should assign_to(:items).with([@item])
# ...
end
end
```

@item loses his value in with([@item]) like it was nil:

Failure: Expected action to assign [nil] for items, but got [#
]
test: getting index should assign @items. (itemsControllerTest)