How do I have a negative scenario with Cucumber in Rails?
问题 I have a negative scenario to test with Cucumber. Specifically, I want to make sure that when someone posts a URL with an invalid handle then the site returns an error. My scenario looks like: Scenario: create person with too short a handle When person named "Fred" with handle "tooshort" updates Then I should get a 500 error My step looks like When /^person named "(. )" with handle "(. )" updates$/ do |name, handle| visit "/mobile/update?handle=#{udid}&name=#{name}" When I run the scenario,