[rspec-users] What command to run all stories?

Ed Howland ed.howland at gmail.com
Thu Nov 15 11:56:55 EST 2007

Hi, I've been following this thread and I can get the example stories
to run with the ruby command. But I've been unable to get the example
from http://blog.davidchelimsky.net/articles/2007/10/25/plain-text-stories-part-iii
to run with all.rb

ruby stories/all.rb
/home/edh/story/stories/additions/steps/addition_steps.rb:2: undefined
method `steps_for' for main:Object (NoMethodError)
        from /home/edh/story/stories/all.rb:3:in `require'
        from /home/edh/story/stories/all.rb:3
        from /home/edh/story/stories/all.rb:2:in `each'
        from /home/edh/story/stories/all.rb:2
        from stories/all.rb:3:in `require'
        from stories/all.rb:3
        from stories/all.rb:2:in `each'
        from stories/all.rb:2

The examples seem older than the version on David's blog. Am I missing
some parts from David's blog?

My directory looks like:
|-- additions
|   |-- adder.rb
|   |-- addition
|   |-- addition.rb
|   `-- steps
|       `-- addition_steps.rb
|-- all.rb
`-- helper.rb

If I run the story stand-alone, I get:
ruby stories/additions/addition.rb
Running 2 scenarios:

Story: simple addition

  As an accountant
  I want to add numbers
  So that I can count beans

Scenario: add one plus one

  Given an addend of 1 (PENDING)
  And an addend of 1 (PENDING)

  When the addends are added (PENDING)

  Then the sum should be 2 (PENDING)
  And the corks should be
`check': SQL logic error or missing database (SQLite3::SQLException)
        from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/resultset.rb:76:in
        from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/resultset.rb:68:in
        from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/resultset.rb:61:in
        from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/statement.rb:163:in
        from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/statement.rb:163:in
        from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/database.rb:212:in
        from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/database.rb:187:in
        from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/database.rb:211:in
         ... 13 levels...
        from /home/edh/story/vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb:39:in
        from /home/edh/story/vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb:39:in
        from /home/edh/story/vendor/plugins/rspec/lib/spec/story/runner.rb:41:in
        from stories/additions/addition.rb:3
This last part is happening in the at_exit part of Test:Unit

Also, I don't understand why the scenario's are pending.


Ed Howland
"The information transmitted is intended only for the person or entity
to which it is addressed and may contain proprietary, confidential
and/or legally privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance
upon, this information by persons or entities other than the intended
recipient is prohibited. If you received this in error, please contact
the sender and delete the material from all computers."

More information about the rspec-users mailing list