Skip to content

Commit

Permalink
Release 1.2.22
Browse files Browse the repository at this point in the history
  • Loading branch information
heynemann committed May 13, 2010
1 parent 50c7ecd commit f3bc706
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyccuracy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
from pyccuracy.drivers import DriverRegistry
from pyccuracy.drivers.core import *

Version = "1.2.21"
Version = "1.2.22"
Release = "Clarytin"
2 changes: 1 addition & 1 deletion pyccuracy/pyccuracy_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def main(arguments=sys.argv[1:]):
parser.add_option("-F", "--reportfile", dest="report_file_name", default="report.html", help="Report file. Defines the file name to write the report with [default: %default].")

#verbosity
parser.add_option("-v", "--verbosity", dest="verbosity", default="2", help="Verbosity. 0 - does not show any output, 1 - shows text progress, 2 - shows animated progress bar, 3 - shows action by action [default: %default].")
parser.add_option("-v", "--verbosity", dest="verbosity", default="3", help="Verbosity. 0 - does not show any output, 1 - shows text progress, 2 - shows animated progress bar, 3 - shows action by action [default: %default].")

options, args = parser.parse_args(arguments)

Expand Down
65 changes: 65 additions & 0 deletions tests/unit/test_story_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ def test_story_runner_returns_a_result_with_a_Fixture():
context.settings.on_before_action = None
context.settings.on_action_successful = None
context.settings.on_action_error = None
context.language = Mock()
context.language \
.expects(once()) \
.get(eq('given')) \
.will(return_value('Given'))
context.language \
.expects(once()) \
.get(eq('when')) \
.will(return_value('When'))
context.language \
.expects(once()) \
.get(eq('then')) \
.will(return_value('Then'))

result = runner.run_stories(settings, fixture, context=context)

Expand All @@ -84,6 +97,19 @@ def test_story_runner_returns_a_result_with_the_original_Fixture():
context.settings.on_before_action = None
context.settings.on_action_successful = None
context.settings.on_action_error = None
context.language = Mock()
context.language \
.expects(once()) \
.get(eq('given')) \
.will(return_value('Given'))
context.language \
.expects(once()) \
.get(eq('when')) \
.will(return_value('When'))
context.language \
.expects(once()) \
.get(eq('then')) \
.will(return_value('Then'))

result = runner.run_stories(settings, fixture, context=context)

Expand Down Expand Up @@ -128,6 +154,19 @@ def test_should_execute_scenarios_successfully():
context.settings.on_before_action = None
context.settings.on_action_successful = None
context.settings.on_action_error = None
context.language = Mock()
context.language \
.expects(once()) \
.get(eq('given')) \
.will(return_value('Given'))
context.language \
.expects(once()) \
.get(eq('when')) \
.will(return_value('When'))
context.language \
.expects(once()) \
.get(eq('then')) \
.will(return_value('Then'))

result = runner.run_stories(settings=settings, fixture=fixture, context=context)

Expand All @@ -153,6 +192,19 @@ def action_failed_method(context, *args, **kwargs):
context.settings.on_before_action = None
context.settings.on_action_successful = None
context.settings.on_action_error = None
context.language = Mock()
context.language \
.expects(once()) \
.get(eq('given')) \
.will(return_value('Given'))
context.language \
.expects(once()) \
.get(eq('when')) \
.will(return_value('When'))
context.language \
.expects(once()) \
.get(eq('then')) \
.will(return_value('Then'))

result = runner.run_stories(settings=settings, fixture=fixture, context=context)

Expand All @@ -178,6 +230,19 @@ def action_failed_method(context, *args, **kwargs):
context.settings.on_before_action = None
context.settings.on_action_successful = None
context.settings.on_action_error = None
context.language = Mock()
context.language \
.expects(once()) \
.get(eq('given')) \
.will(return_value('Given'))
context.language \
.expects(once()) \
.get(eq('when')) \
.will(return_value('When'))
context.language \
.expects(once()) \
.get(eq('then')) \
.will(return_value('Then'))

result = runner.run_stories(settings=settings, fixture=fixture, context=context)

Expand Down

0 comments on commit f3bc706

Please sign in to comment.