Commit 4db6b114 by Gabriel Falcão

fixing tests

parent 1db7a417
...@@ -279,5 +279,5 @@ def test_output_when_could_not_find_features(): ...@@ -279,5 +279,5 @@ def test_output_when_could_not_find_features():
assert_stdout_lines( assert_stdout_lines(
'\033[1;31mOops!\033[0m\n' '\033[1;31mOops!\033[0m\n'
'\033[1;37mcould not find features at \033[1;33m%s\033[0m\n' % path '\033[1;37mcould not find features at \033[1;33m./%s\033[0m\n' % path
) )
...@@ -135,7 +135,6 @@ def test_after_each_all_is_executed_before_each_all(): ...@@ -135,7 +135,6 @@ def test_after_each_all_is_executed_before_each_all():
"terrain.before.each_all and terrain.after.each_all decorators" "terrain.before.each_all and terrain.after.each_all decorators"
import lettuce import lettuce
from lettuce.fs import FeatureLoader from lettuce.fs import FeatureLoader
CALLBACK_REGISTRY.clear()
world.all_steps = [] world.all_steps = []
mox = Mox() mox = Mox()
...@@ -159,6 +158,10 @@ def test_after_each_all_is_executed_before_each_all(): ...@@ -159,6 +158,10 @@ def test_after_each_all_is_executed_before_each_all():
lettuce.Feature.from_file('some_basepath/foo.feature'). \ lettuce.Feature.from_file('some_basepath/foo.feature'). \
AndReturn(Feature.from_string(FEATURE2)) AndReturn(Feature.from_string(FEATURE2))
mox.ReplayAll()
runner = lettuce.Runner('some_basepath')
CALLBACK_REGISTRY.clear()
@before.all @before.all
def set_state_to_before(): def set_state_to_before():
world.all_steps.append('before') world.all_steps.append('before')
...@@ -172,9 +175,6 @@ def test_after_each_all_is_executed_before_each_all(): ...@@ -172,9 +175,6 @@ def test_after_each_all_is_executed_before_each_all():
world.all_steps.append('after') world.all_steps.append('after')
isinstance(total, TotalResult) isinstance(total, TotalResult)
mox.ReplayAll()
runner = lettuce.Runner('some_basepath')
runner.run() runner.run()
mox.VerifyAll() mox.VerifyAll()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment