[rspec-users] Running simple rspec, no output

David Chelimsky dchelimsky at gmail.com
Thu Nov 19 11:13:50 EST 2009


On Thu, Nov 19, 2009 at 4:11 AM, bqaanne <beccy_anne at 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?

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20091119/f5f43cc4/attachment.html>


More information about the rspec-users mailing list