Skip to content

Instantly share code, notes, and snippets.

@octosteve
Created October 24, 2013 01:22
Show Gist options
  • Save octosteve/7129746 to your computer and use it in GitHub Desktop.
Save octosteve/7129746 to your computer and use it in GitHub Desktop.
Testing
require 'minitest/autorun'
describe Toy do
it "has a name, description, and a player" do
bopit = Toy.new "Bop-it!", "A game for grabby people", "Steven"
bopit.welcome.must_equal "Welcome to Bop-it! Steven! A game for grabby people"
end
it "can have the player changed" do
bopit = Toy.new "Bop-it!", "A game for grabby people", "Steven"
bopit.player = "Eddie"
bopit.player.must_equal "Eddie"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment