On Thu, Nov 19, 2009 at 4:11 AM, bqaanne <beccy_a...@hotmail.com> wrote:

>
> Hi,
>
> I am very new to Ruby and Rspec, and found a simple tutorial online about
> rspec.
>
> It involves two files:
> bowling.rb and bowling_spec.rb
>
> # bowling_spec.rb
> require'rubygems'
> require 'spec'
> require 'bowling'
>
> describe Bowling do
>  it "should score 0 for gutter game" do
>    bowling = Bowling.new
>    20.times { bowling.hit(0) }
>    bowling.score.should == 0
>  end
> end
>
> #bowling.rb
> class Bowling
>  def hit(pins)
>  end
>
>  def score
>    1
>  end
> end
>
> When I run the spec, I expect to see some sort of output along these lines:
> "Bowling should score 0 for gutter game".
>
> When I run it (from text mate) there are no errors, and there is no output.
> I see the same result running it from the command line.
>
> Am I doing something wrong?
>
> Thanks,
> Beccy


What command are you using from the command line? And what about in
textmate? Do you have the RSpec tmbundle installed?

>
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to