Skip to content

Instantly share code, notes, and snippets.

@adaschevici
Created December 12, 2013 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adaschevici/dbf8623c6ee6bcf76fb4 to your computer and use it in GitHub Desktop.
Save adaschevici/dbf8623c6ee6bcf76fb4 to your computer and use it in GitHub Desktop.
steps to reproduce
__author__ = 'hackawaye'
from lettuce import *
# @step('I have the number (\d+)')
# def have_the_number(step, number):
# world.number = int(number)
#
# @step('I compute its factorial')
# def compute_its_factorial(step):
# world.number = factorial(world.number)
#
# @step('I see the number (\d+)')
# def check_number(step, expected):
# expected = int(expected)
# assert world.number == expected, \
# "Got %d" % world.number
#
# def factorial(number):
# return 1
from lettuce import step
@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):
assert True
@step("I run server sync")
def server_sync_utcnow(step):
assert False
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
Then I run server sync at 5:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment