Hi all, 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? -- Posted via http://www.ruby-forum.com/.
On Jun 2, 2008, at 11:28 AM, Matt Wynne wrote:> Hi all, > > 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?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. Cheers, David
Matt Wynne wrote:> Hi all, > > 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? >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 -Ben
David Chelimsky wrote:> On Jun 2, 2008, at 11:28 AM, Matt Wynne wrote: > >> Hi all, >> >> 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? > > 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. > > Cheers, > David > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-usersDavid, 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. -Ben
Ben Mabey wrote:> 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=htmlMan, you gentlemen are quick of the mark! Thanks for the info guys. Matt -- Posted via http://www.ruby-forum.com/.
On Jun 2, 2008, at 12:20 PM, Matt Wynne <lists at ruby-forum.com> wrote:> Ben Mabey wrote: >> 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 > > Man, you gentlemen are quick of the mark! > > Thanks for the info guys.Did that work? I''m not able to check this minute, but I recall a bug w/ rspec/rails/stories.> > > Matt > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
David Chelimsky wrote:> On Jun 2, 2008, at 12:20 PM, Matt Wynne <lists at ruby-forum.com> wrote: > >> Ben Mabey wrote: >>> 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 >> >> Man, you gentlemen are quick of the mark! >> >> Thanks for the info guys. > > 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> >> >> >> Matt >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
On Mon, 2008-06-02 at 14:52 -0600, Ben Mabey wrote:> David Chelimsky wrote:> > 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.I did notice that the stories output is now colored again in my rails project with rspec 1.1.4, so I guess this has also fixed http://rspec.lighthouseapp.com/projects/5645/tickets/286-c-does-not-run-stories-in-color Makes sense as this also involves passing throught the command line options. Kind regards, Hans -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080603/77a59fe1/attachment.bin>