Created
January 2, 2014 22:42
-
-
Save tarynsauer/8228515 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
| require 'spec_helper' | |
| describe 'AppController', :type => :feature do | |
| include GameHelpers | |
| before :each do | |
| def session # Creates new rack mock session object | |
| MockSession.new(rack_mock_session.cookie_jar) # (from mixin) Creates rack mock session object, Assigns new session to Cookie Jar object | |
| end | |
| end | |
| describe '#get_game' do | |
| before :each do | |
| session[:player_one_type] = 'human' | |
| session[:player_two_type] = 'computer' | |
| session[:board_size] = 3 | |
| session[:current_board] = {"1A"=>nil, "2A"=>'X', "3A"=>nil, | |
| "1B"=>nil, "2B"=>nil, "3B"=>nil, | |
| "1C"=>nil, "2C"=>nil, "3C"=>nil} | |
| end | |
| it 'returns a WebGame object' do | |
| get_game.is_a?(WebGame) | |
| end | |
| ... | |
| end | |
| ... | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment