Sha256: c74339394237e850b10d947bc484f3187520b49f1ebb9833430b19d432a7bd54

Contents?: true

Size: 751 Bytes

Versions: 3

Compression:

Stored size: 751 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'


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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
picolena-0.1.6 rails_plugins/rspec/failing_examples/team_spec.rb
picolena-0.1.7 rails_plugins/rspec/failing_examples/team_spec.rb
picolena-0.1.8 rails_plugins/rspec/failing_examples/team_spec.rb