[rspec-users] HTML Story Formatter

David Chelimsky dchelimsky at gmail.com
Fri Jul 25 09:11:38 EDT 2008

On Fri, Jul 25, 2008 at 8:08 AM, Joseph Wilk <lists at ruby-forum.com> wrote:
> To handle this I wrote a patch which delivered the styles in the html
> formatters output. In much the same way as the html spec formatter does.
> I know Aslak Hellesøy has been looking at the editable html stories.
> Is it acceptable to have stories have styles embedded in the html
> formatter until Aslak's editable stories project evolves?
> I could imagine there are some arguments that the HTML output of stories
> is something people might want to control the look and feel of, more so
> than specs as they are seen more frequently by customers.
> Perhapes by default the styles are embedded in the html formatter but if
> a CSS stylesheet is passed to the formatter than it will suppress this
> output and use your custom css.
> something like:
> ruby stories/all.rb --format html --css my_own.css

That all sounds reasonable to me. Sensible defaults, yet configurable.

Other opinions?

> --
> Joseph Wilk,
> http://www.joesniff.co.uk
> David Chelimsky wrote:
>> On Thu, Jul 24, 2008 at 7:32 AM, Jonathan Leighton
>> <j at jonathanleighton.com> wrote:
>>> Hiya,
>>> I am trying to use the HTML Story Formatter in conjunction with
>>> CruiseControl.rb. I have got it outputting the stories to a file, but I
>>> notice there are CSS and JS files linked in the head, which don't appear
>>> to be anywhere in the rspec repository. Are these files available and if
>>> so where?
>> They're in the story_server directory. We haven't automated this yet,
>> so what I do is just copy them to a logical place and set up a rake
>> task to put the stories in the same place. On Rails projects, I've
>> gotten into the habit of putting them in
>> public/doc/[javascripts|stylesheets] (or similar) and then use this
>> rake task.
>> namespace :stories do
>>   desc "Run all the stories (HTML)"
>>   task :html do
>>     sh "ruby stories/all.rb -fh:public/doc/index.html"
>>   end
>> end
>> Now the customers can see the story output at /docs. Of course, so can
>> anybody else, so that might come down before releasing or move to a
>> controller that can manage who gets to see it. But this should give
>> you an idea.
>> Also note that the javascript is 1/2 baked at this point and includes
>> an "add step" (non) feature (which you'll see in the browser) that
>> doesn't really do anything.
>> Maybe it's time to get rid of that for now and standardize on where
>> this stuff goes :)
>> HTH,
>> David
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list