Displaying 1 result from an estimated 1 matches for "test_the_string_doohicky".
2006 Jan 20
2
Help needed using assigns() functionality in functional test
...now, anyway) breaks apart a string and populates intermediate variables
with the results. I want to check the intermediate vars in my test, so I
tried the following
(in the controller)
def string_action
# do some processing, etc.
@string_segment = "howdy"
end
(in the unit test)
def test_the_string_doohicky
post :string_action, ... some params here, etc.
assert_equal "howdy", assigns["string_segment"]
end
The assigns[] always comes up nil, so I must be missing something here.
Any pointers?
TIA,
Keith
Reply with quote
--
Posted via http://www.ruby-forum.com/.