RailsStory - lessons learned

After trying RailsStory for a few days, I have learned:

  1. Rails testing support does not serve up static pages

  2. RailsStory masks errors generated by the app under test

  3. The masked errors are available in log/test

  4. I should read log/test more often

See Parked at Loopia for an example for points 2 and 3

The welcome controller fails when the HTTP_USER_AGENT is missing.

This error shows up in log/test but I do not know how to display the
error from within RailsStory.

Alvin.

On 10/16/07, Alvin S. [email protected] wrote:

After trying RailsStory for a few days, I have learned:

  1. Rails testing support does not serve up static pages

  2. RailsStory masks errors generated by the app under test

  3. The masked errors are available in log/test

  4. I should read log/test more often

Or you can do this:

class WelcomeController; def rescue_action(e) raise e; end; end

David C. wrote:

  1. I should read log/test more often

Or you can do this:

class WelcomeController; def rescue_action(e) raise e; end; end

True.

I am writing stories for an existing rails app that has morphed several
times.

I am still learning which http parameters, headers, etc that are
required.

This might help:
http://www.dcmanges.com/blog/debugging-rails-integration-tests
-Ben

The welcome controller fails when the HTTP_USER_AGENT is missing.

Alvin–

Try:

request.stub!(:user_agent).and_return(‘Mozilla’)

Thanks!

A usable stack trace now shows up in the console.

Alvin.