Created
April 8, 2014 21:32
-
-
Save RyanSnodgrass/10195969 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
require 'rspec' | |
require './horserace.rb' | |
describe Horse do | |
let(:horse) {Horse.new} | |
it 'should exist' do | |
horse.should_not eq(nil) | |
end | |
it 'should create user horse' do | |
user_horse = Horse.new(true) | |
user_horse.stub(:gets).and_return("tripod") | |
user_horse.get_name.should eq("tripod") | |
end | |
it 'should do bot run' do | |
horse.bot_run.should_not eq(nil) | |
end | |
end | |
describe Game do | |
let(:play) {Game.new} | |
it 'should print graphic' do | |
play.horse_graphic.should_not eq(nil) | |
end | |
it 'should print bot tracks' do | |
play.matz_track.should_not eq(nil) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment