Browse files

Fixed tests for Freshen

  • Loading branch information...
1 parent a4ee9fb commit 1550130723804c6308838d941adea8b26b0e8e76 @amolenaar amolenaar committed Jun 18, 2010
Showing with 19 additions and 12 deletions.
  1. +1 −1 setup.py
  2. +18 −11 tests/features/steps.py
View
2 setup.py
@@ -135,7 +135,7 @@ def run(self):
setup_requires = [
'nose >= 0.10.4',
- 'lettuce >= 0.1.5',
+ 'freshen >= 0.2',
'setuptools-git >= 0.3.4'
],
View
29 tests/features/steps.py
@@ -1,26 +1,33 @@
-from lettuce import *
+from freshen import *
from gaphor.application import Application
-@before.each_feature
-def setup_application(step):
+@Before
+def setup_application(sc):
+ print 'App init'
Application.init()
+ print 'App init done'
-@after.each_feature
-def shutdown_application(step):
+@After
+def shutdown_application(sc):
+ print 'App shitdown'
Application.get_service('element_factory').shutdown()
Application.shutdown()
+ print 'App shitdown done'
-@step('I load the model "([^"]+)"')
-def when_i_load_the_model(step, filename):
+@Given('I load the model "([^"]+)"')
+def when_i_load_the_model(filename):
+ print 'step 1'
from gaphor.storage.storage import load
load(filename, Application.get_service('element_factory'))
-@step('I open diagram "([^"]+)"')
-def when_i_open_diagram(step, name):
+@When('I open diagram "([^"]+)"')
+def when_i_open_diagram(name):
+ print 'step 2'
pass
-@step('I have (\d+) opene?d? diagrams?')
-def have_n_open_diagrams(self, n):
+@Then('I have (\d+) opene?d? diagrams?')
+def have_n_open_diagrams(n):
+ print 'step 3'
n = int(n)

0 comments on commit 1550130

Please sign in to comment.