Allow the dry run mode
We'll need to support the dry-run mode of cucumber. This will be used for lots of things, but mainly to list the existing defined steps with the following command for example:
cucumber -d -f stepdefs
This will allow people to know which sentences has already been defined to ease the test writing. Thanks to Fabien Lydoire for this idea ;)
I already test this little "bad" patch to test it can be done and it works. We need now a "clean" way to deal with that dry-run mode.
Here is my patch :
=== modified file 'features/
--- features/
+++ features/
@@ -19,18 +19,25 @@
#
######
unless $utils
+ begin
$utils = ScenarioUtils.new
+ rescue Exception => e
+ puts 'No ScenarioUtils loaded, probably --dry-run option mode'
+ end
end
Before do
if not $utils :
- $utils = ScenarioUtils.new
- puts 'reset connection'
+ begin
+ $utils = ScenarioUtils.new
+ puts 'No ScenarioUtils loaded, probably --dry-run option mode'
+ rescue
+ puts ''
+ end
end
@res = false
@part = false
@account_id = false
@prod = false
-
end
######
Blueprint information
- Status:
- Not started
- Approver:
- Joël Grand-Guillaume @ camptocamp
- Priority:
- Undefined
- Drafter:
- Joël Grand-Guillaume @ camptocamp
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by