Skip to content

Instantly share code, notes, and snippets.

@k-bx
Created February 11, 2014 10:41
Show Gist options
  • Select an option

  • Save k-bx/8932666 to your computer and use it in GitHub Desktop.

Select an option

Save k-bx/8932666 to your computer and use it in GitHub Desktop.
Feature: Compute factorial
In order to play with Lettuce
As beginners
We'll implement factorial
Scenario: Backup at certain times
Given I have the time 18:00
Then I run server sync at "5:00"
Scenario: Backup at certain times
Given I have the time 18:00
Then I run server sync at "5:00" with error
from lettuce import step
from lettuce import world
@step("I have the time 18:00")
def getting_time(step):
world.time = '18:00'
@step('I run server sync at "([^"]*)"')
def server_sync_at_date(step, time):
print '> server_sync_at_date'
print ''
assert True
@step('I run server sync at "([^"]*)" with error')
def server_sync_at_date_with_error(step, time):
print '> server_sync_at_date_error'
print ''
assert False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment