rlisagor / freshen

Clone of the Cucumber BDD framework for Python
GNU General Public License v3.0
355 stars 56 forks source link

Undefined steps should generate default code in the output #15

Open jacek99 opened 14 years ago

jacek99 commented 14 years ago

When experimenting with Lettuce (a competing BDD tool), I noticed that when you have undefined steps, it will actually output a skeleton of the required code for a developer to quickly start with, e.g.:

    You can implement step definitions for undefined steps with these snippets:

    # -*- coding: utf-8 -*-
from lettuce import step

@step(u'Given I have the request body \'(.*)\'')
def given_i_have_the_request_body_group1(step, group1):
    assert False, 'This step must be implemented'
@step(u'When I send it to SPS SOAP Service <soap>')
def when_i_send_it_to_sps_soap_service_soap(step):
    assert False, 'This step must be implemented'
@step(u'Then I get the HTTP code 500 (Error)')
def then_i_get_the_http_code_500_error(step):
    assert False, 'This step must be implemented'
@step(u'Given I have no data in the database')
def given_i_have_no_data_in_the_database(step):
    assert False, 'This step must be implemented'
@step(u'When I send request <request> to the SPS SOAP Service <soap>')
def when_i_send_request_request_to_the_sps_soap_service_soap(step):
    assert False, 'This step must be implemented'
@step(u'Then I get the HTTP code 204 (No Content)')
def then_i_get_the_http_code_204_no_content(step):
    assert False, 'This step must be implemented'

It would be great if Freshen could offer similar functionality in order to improve developer productivity

rlisagor commented 13 years ago

Good idea. Adding to 1.0 milestone.

linovia commented 13 years ago

Isn't this resolved with the --list-undefined switch ?

dexterous commented 13 years ago

Hasn't this already been pulled/merged; shouldn't this be closed?