I’m just getting to grips with rspec, and I’m trying to put together a
showy demo. We’re trying to use the (plain text) stories feature, rather
than the specs. I’d like to show off a fancy HTML report of the results
if possible.
So it seems I can do this from the spec command line tool, but I can’t
make it work for a story.
I’ve got the three files (story.txt, steps.rb, runner.rb) from the
rspec.info homepage, and I can run then by doing
ruby runner.rb
All splendid so far.
By when I try to do
spec runner.rb
It doesn’t want to play. I don’t get an error message or anything, it
just seems to ignore me.
Does spec support stories, or just specs? If so, what am I doing wrong?
I’ve got the three files (story.txt, steps.rb, runner.rb) from the
Does spec support stories, or just specs? If so, what am I doing wrong?
The spec command is just for specs. Although the story runner now uses
the same command line option parser. So you can pass in the args when
running your runner file. Like so:
ruby story.rb -f=html
or the verbose way:
ruby story.rb --format=html
make it work for a story.
It doesn’t want to play. I don’t get an error message or anything, it
just seems to ignore me.
Does spec support stories, or just specs? If so, what am I doing
wrong?
There is a bug right now when running stories w/ rails using the html
formatter. I’m heading out the door right now, but will follow up
later with a hack I used to get it to work. Should get fixed in source
sometime soon.
The spec command is just for specs. Although the story runner now uses
the same command line option parser. So you can pass in the args when
running your runner file. Like so:
ruby story.rb -f=html
or the verbose way:
ruby story.rb --format=html
David,
Are you sure there is a bug? (what ticket number?) I can get it to work
just fine, and just barely verified this. In fact, I am using it in my
textmate story bundle that I have on github.
Did that work? I’m not able to check this minute, but I recall a bug
w/ rspec/rails/stories.
Yes, there was a bug that prevented it before. I believe this was
resolved some time ago with a commit by Aslak… Not sure… But, it is
working with rails now.
-Ben
Did that work? I’m not able to check this minute, but I recall a bug
w/ rspec/rails/stories.
Yes, there was a bug that prevented it before. I believe this was
resolved some time ago with a commit by Aslak… Not sure… But, it is
working with rails now.