Sha256: 955d03a49f4c340a20f24aa020175070546d52066971028e1a06a8b2c6880aaa
Contents?: true
Size: 877 Bytes
Versions: 2
Compression:
Stored size: 877 Bytes
Contents
When /^I (?:fill in|select|choose|check|press) a nonexistent (.+) an error should be raised$/ do |type| case type when "text field" then assert_raise(RuntimeError) do When %{I fill in "nonexistent" with "anything"} end when "select field" then assert_raise(RuntimeError) do When %{I select "anything" from "nonexistent"} end when "radio button" then assert_raise(RuntimeError) do When %{I choose "nonexistent"} end when "check box" then assert_raise(RuntimeError) do When %{I check "nonexistent"} end when "button" then assert_raise(RuntimeError) do When %{I press "nonexistent"} end else assert false end end When /^I select a missing option from an existing select an error should be raised$/ do assert_raise(RuntimeError) do When %{I select "nonexistent" from "Exists"} end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mechanical-cuke-0.4.1 | features/step_definitions/missing_field_steps.rb |
mechanical-cuke-0.4.0 | features/step_definitions/missing_field_steps.rb |