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:
Luke Melia 2008-06-18 02:57:57 -04:00
parent 0600756bbf
commit 0f7d6f7a1d
602 changed files with 47788 additions and 29 deletions

View file

@ -0,0 +1,45 @@
require File.dirname(__FILE__) + '/spec_helper'
def behave_as_electric_musician
respond_to(:read_notes, :turn_down_amp)
end
def behave_as_musician
respond_to(:read_notes)
end
module BehaveAsExample
class BluesGuitarist
def read_notes; end
def turn_down_amp; end
end
class RockGuitarist
def read_notes; end
def turn_down_amp; end
end
class ClassicGuitarist
def read_notes; end
end
describe BluesGuitarist do
it "should behave as guitarist" do
BluesGuitarist.new.should behave_as_electric_musician
end
end
describe RockGuitarist do
it "should behave as guitarist" do
RockGuitarist.new.should behave_as_electric_musician
end
end
describe ClassicGuitarist do
it "should not behave as guitarist" do
ClassicGuitarist.new.should behave_as_musician
end
end
end