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
-- 
View this message in context: 
http://old.nabble.com/Running-simple-rspec%2C-no-output-tp26421308p26421308.html
Sent from the rspec-users mailing list archive at Nabble.com.

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

Reply via email to