Groups
Groups
Sign in
Groups
Groups
rspec
Conversations
About
Send feedback
Help
Rails view specs - Shouldn't a variable created with assign method be reset to nil between tests?
5 views
Skip to first unread message
Arif Bandali
unread,
Apr 26, 2014, 5:41:14 PM
4/26/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rs...@googlegroups.com
Hi all,
rspec 2.14.8
I have a view spec with 2 tests and an call to assign creates an instance variable but it does not clear before the next test begins. Shouldn't it?
The tests are in this gist, with the assign call being highlighted.
https://gist.github.com/arifb/55773c21fd8dac3a47f1#file-new-html-erb_spec-rb-L20
I would expect @beneficiary to be nil for the 2nd test however it doesn't seem to be.
Thanks!
Reply all
Reply to author
Forward
0 new messages