Last active
January 1, 2016 16:39
-
-
Save tarynsauer/8172052 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| include TicTacToeCapybaraTest | |
| Given(/^I press the (\d+)A cell button$/) do |arg1| | |
| click_button "#{arg1}A" | |
| end | |
| Then(/^I should see a marker in the (\d+)A cell$/) do |arg1| | |
| expect(page).to have_css("#board button[value=\"#{arg1}A\"]", text: (/(X|O)/)) | |
| end | |
| Given(/^I press the (\d+)B cell button$/) do |arg1| | |
| click_button "#{arg1}B" | |
| end | |
| Then(/^I should see different markers in the (\d+)A and (\d+)B cells$/) do |arg1, arg2| | |
| expect(page.all("#board button", text: (/[XO]/)).count.should eql(2)) | |
| end | |
| Then(/^cell (\d+)B should not have a marker$/) do |arg1| | |
| page.should have_no_selector("#board button[value='#{arg1}B']") | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment