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:
stories/
|-- 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
popped/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/errors.rb:94:in
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
check’
from
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/resultset.rb:68:in
commence' from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/resultset.rb:61:in
initialize’
from
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/statement.rb:163:in
new' from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/statement.rb:163:in
execute’
from
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/database.rb:212:in
execute' from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/database.rb:187:in
prepare’
from
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/database.rb:211:in
execute' ... 13 levels... from /home/edh/story/vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb:39:in
each’
from
/home/edh/story/vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb:39:in
run_stories' from /home/edh/story/vendor/plugins/rspec/lib/spec/story/runner.rb:41:in
register_exit_hook’
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.
Thanks
Ed
–
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.”