factory_toys 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +69 -9
- data/VERSION +1 -1
- data/factory_toys.gemspec +1 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -1,19 +1,80 @@
|
|
1
1
|
= FactoryToys
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
This is a idea to help with Feature Management and works in a as a set of
|
4
|
+
feature configuration files that can use ruby to do fancy things and ultimately
|
5
|
+
simplify the process of updating your features.
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
The tool is designed to be use where you need to manage large numbers of
|
8
|
+
features which all have very similar featureset (i.e. only one of two difference)
|
9
9
|
|
10
10
|
== Can't I just use Scenario Outlines to do this I hear you ask..
|
11
11
|
|
12
|
-
|
12
|
+
Yes some of it you can.. but the things you can't:
|
13
13
|
|
14
|
-
* Use a parameter to slightly change
|
15
|
-
* Output actual features which is my mind makes fixing any breaks in the test easier.
|
14
|
+
* Use a parameter to slightly change your hook configuration
|
15
|
+
* Output actual features which is my mind makes fixing any breaks in the test easier as the feature runs each step on the screen.
|
16
16
|
|
17
|
+
== Usage
|
18
|
+
|
19
|
+
Add the following lines of code tyo you capybara/cucumber env.rb file
|
20
|
+
|
21
|
+
require 'factory_toys'
|
22
|
+
FactoryToys.update_features
|
23
|
+
|
24
|
+
=== Configuration Options:
|
25
|
+
|
26
|
+
Set the Directory to read the configuration files from
|
27
|
+
|
28
|
+
FactoryToys.source_directory = 'ffactories'
|
29
|
+
|
30
|
+
Set the Directory to save the features to
|
31
|
+
|
32
|
+
FactoryToys.features_directory = 'features'
|
33
|
+
|
34
|
+
Set the naming convention for the configuration options
|
35
|
+
|
36
|
+
FactoryToys.scenarios = 'feature'
|
37
|
+
|
38
|
+
Set the naming convention for the scenario template
|
39
|
+
|
40
|
+
FactoryToys.scenario = 'scenario'
|
41
|
+
|
42
|
+
=== Configuration File
|
43
|
+
|
44
|
+
The configuration file is made up of three main parts:
|
45
|
+
|
46
|
+
*FEATURE DESCRIPTION*
|
47
|
+
|
48
|
+
So the text to go at the top of the feature. This is mandatory and should be input as a multi line text.
|
49
|
+
|
50
|
+
feature = <<- FEATURE_DESCRIPTION
|
51
|
+
-- your feature description here --
|
52
|
+
FEATURE_DESCRIPTION
|
53
|
+
|
54
|
+
*CONFIGURATION OPTIONS*
|
55
|
+
|
56
|
+
This is used to define the grouping and output options in a hash.
|
57
|
+
|
58
|
+
my_feature = {:foreach => [:dow], :option1 => ['Sun','Mon','Tue','Wed','Thu','Fri','Sat','Sun']}
|
59
|
+
|
60
|
+
As this is straight ruby code you can you any helper, constants, etc that you can think of here.
|
61
|
+
|
62
|
+
The variable name used should be in the format:
|
63
|
+
<identifier>_feature
|
64
|
+
|
65
|
+
*SCENARIO TEMPLATE*
|
66
|
+
|
67
|
+
This is the Scenario that will be generated with the above options. This is should be input as a multi line text.
|
68
|
+
|
69
|
+
my_scenario = <<- SCENARIO_TEMPLATE
|
70
|
+
@setup_#{dow}_settings
|
71
|
+
Given David is Better than Tom
|
72
|
+
When Tom is Great
|
73
|
+
Then Dave is Better
|
74
|
+
SCENARIO_TEMPLATE
|
75
|
+
|
76
|
+
The variable name used should be in the format:
|
77
|
+
<identifier>_scenario
|
17
78
|
|
18
79
|
== ToDo
|
19
80
|
|
@@ -22,7 +83,6 @@
|
|
22
83
|
* Add functionality to only rebuild the feature file if there has been a change most likely using fssm once I have a look and understand how it works..
|
23
84
|
* Add other configuration options.. Not really sure what else is needed but am sure somthing will turn up
|
24
85
|
* Fix the readme so it is not quite so much of a ramble.
|
25
|
-
* Add exmaple code to the readme so that people can see how this should work
|
26
86
|
* Add generator so that templates can be generated
|
27
87
|
* Rename the gem to FeatureToys (Did I fcuk up or what)
|
28
88
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/factory_toys.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factory_toys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Henry
|