mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-21 09:40:13 +01:00
Added Rspec and Webrat plugins and started porting Selenium on Rails tests to Rspec Plain Text Stories driving Webrat driving Selenium.
This commit is contained in:
parent
0600756bbf
commit
0f7d6f7a1d
602 changed files with 47788 additions and 29 deletions
44
vendor/plugins/rspec/failing_examples/team_spec.rb
vendored
Normal file
44
vendor/plugins/rspec/failing_examples/team_spec.rb
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue