Permalink
Browse files

Merge pull request #2 from sivart84/cuke_fixes

Fixing cucumber step ambiguity
  • Loading branch information...
2 parents 4423193 + 4dba38a commit 51ef58c7bd159e1a5dd0914625dde654f914b0e7 @sivart84 sivart84 committed Jan 15, 2014
Showing with 7 additions and 17 deletions.
  1. +5 −15 features/radio_button_group.feature
  2. +2 −2 features/step_definitions/radio_button_group_steps.rb
@@ -12,27 +12,17 @@ Feature: Radio Button Groups
Scenario: No radio buttons in the group have been selected
When no radio buttons have been selected
- Then no radio buttons should be selected
-
- Scenario: Selecting grouped radio buttons by text
- When I select the "Cheddar" radio button
- Then the "Cheddar" radio button should be selected
- Then the "Emmental" radio button should not be selected
- Then the "Muenster" radio button should not be selected
- When I select the "Emmental" radio button
- Then the "Cheddar" radio button should not be selected
- Then the "Emmental" radio button should be selected
- Then the "Muenster" radio button should not be selected
+ Then no radio buttons should be selected in the group
Scenario: Selecting grouped radio buttons by value
- When I select the "ched" radio button
- Then the "Cheddar" radio button should be selected
+ When I select the "ched" radio button in the group
+ Then the "Cheddar" radio button should be selected in the group
Then the "Emmental" radio button should not be selected
Then the "Muenster" radio button should not be selected
- When I select the "muen" radio button
+ When I select the "muen" radio button in the group
Then the "Cheddar" radio button should not be selected
Then the "Emmental" radio button should not be selected
- Then the "Muenster" radio button should be selected
+ Then the "Muenster" radio button should be selected in the group
Scenario: Getting an array of elements for each radio button in the group
When I ask for the elements of a radio button group
@@ -6,11 +6,11 @@
@page.favorite_cheese_selected?.should == false
end
-When /^I select the "([^\"]*)" radio button$/ do |how|
+When /^I select the "([^\"]*)" radio button in the group$/ do |how|
@page.send "select_favorite_cheese(#{how})"
end
-Then /^the "([^\"]*)" radio button should be selected$/ do |how|
+Then /^the "([^\"]*)" radio button should be selected in the group$/ do |how|
@page.favorite_cheese_selected?.should == "#{how}"
end

0 comments on commit 51ef58c

Please sign in to comment.