Instant Bug to Testcase

Today i found a small new plugin, that offers a simple way to convert bugs to a testcase.

script/plugin install

Now every failing request will print a small test case to repeat this request, it is not much, but it is a starting point and can be helpful if you have a lot of parameters being passed.

def test_get_rating_edit_should_not_raise_activerecord_recordnotfound_exception
  assert_nothing_raised(ActiveRecord::RecordNotFound) do
    get :edit, {"id"=>"1"}, {:user_id=>nil, :return_to=>"/orders/1"}, {}, {"_session_id"=>["…"]}

Atm you need to apply this patch to make it work without exception_notification.

module Laziness
    module ExceptionNotifier
      ::ExceptionNotifier.sections << 'laziness'

One thought on “Instant Bug to Testcase

  1. Glad you like the plugin, and thanks for the patch, though I ended up going with a slightly different approach to handling the issue.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s