-
-
Save andrzejsliwa/796778 to your computer and use it in GitHub Desktop.
This file contains 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
Feature: Validate moves | |
Scenario: Moving the knight illegally | |
Given the following board: | |
| | | | | | | | |8| | |
| | | | | | | | |7| | |
| | | | | | | | |6| | |
| | | | | | | | |5| | |
| | | |♞| | | | |4| | |
| | | | | | | | |3| | |
|♙| | | | | | | |2| | |
| | | | | | | | |1| | |
|a|b|c|d|e|f|g|h| | | |
When I attempt d4-d5 | |
Then I should be shown "Illegal move" |
This file contains 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
Given(/the following board:/) do |board| | |
# Create a board, but shave off the sidelines first | |
@board = Board.new(board[0..-2].transpose[0..-2].transpose) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment