Sha256: 8a2da8eaf79f6af27140a97d14681c2355492bc0e8456ca8e6c54a39fb986c13
Contents?: true
Size: 475 Bytes
Versions: 1
Compression:
Stored size: 475 Bytes
Contents
require 'spec_helper' describe 'Player' do describe '#initialize' do it 'accepts a token to assign' do player = Player.new("X") expect(player.token).to eq("X") end end describe '#token' do it 'cannot be changed once assigned in initialize' do player = Player.new("O") expect(player.token).to eq("O") expect{player.token = "O"}.to raise_error(NoMethodError) expect(player).to_not respond_to(:token=) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tictactoe_tracypholmes-0.1.3 | spec/02_player_spec.rb |