Sha256: ed7a1126305d6bc6f7a505ec130d58ac1610d6f8b7b1132c5e1304c52b810b2b

Contents?: true

Size: 761 Bytes

Versions: 89

Compression:

Stored size: 761 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

89 entries across 89 versions & 13 rubygems

Version Path
dchelimsky-rspec-1.1.10 failing_examples/team_spec.rb
dchelimsky-rspec-1.1.11.1 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.11.2 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.11.3 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.11.4 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.11.5 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.11.6 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.11.7 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.12 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.99.1 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.99.13 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.99.2 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.99.3 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.99.4 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.99.5 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.99.6 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.99.7 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.99.8 examples/failing/team_spec.rb
dchelimsky-rspec-1.1.99.9 examples/failing/team_spec.rb
jnstq-acts_as_sms-0.1.0 test/vendor/plugins/rspec/failing_examples/team_spec.rb