Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (33 sloc) 0.711 kB
class Team
attr_reader :players
def initialize
@players = Players.new
end
end
class Players
def initialize
@players = []
end
def size
@players.size
end
def include? player
raise "player must be a string" unless player.is_a?(String)
@players.include? player
end
end
describe "A new team" do
before(:each) do
@team = Team.new
end
it "should have 3 players (failing example)" do
@team.should have(3).players
end
it "should include some player (failing example)" do
@team.players.should include("Some Player")
end
it "should include 5 (failing example)" do
@team.players.should include(5)
end
it "should have no players"
end
Jump to Line
Something went wrong with that request. Please try again.