I followed the Rails Recipes book and refactored my testing code to
use the DSL.
new_session do |bob|
bob.goes_to_login_page
bob.fills_out_the_login_form_and_submits_to_log_in_successfully
:login => @quentin.login,
:password => “test”
bob.views_billing_profile
bob.goes_to_edit_billing_profile_page
end
When I run the test for:
def updates_billing_profile
put :update, :id => 1, :billing_profile => { :name => “Bugs Funny
Bunny” }
end
I get the following error:
BillingProfileStoriesTest
test_should_show_billing_profile_only_for_logged_in_user
ERROR
NoMethodError: undefined method `[]’ for :update:Symbol
Can someone please tell me how to test the Rails 1.2 style update
functionality? TIA.