macros4cuke 0.1.00 → 0.1.02

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/README.md +45 -2
  2. data/lib/macros4cuke/constants.rb +1 -1
  3. metadata +1 -1
data/README.md CHANGED
@@ -4,8 +4,51 @@ Macros4Cuke
4
4
  ## Add macros to your Cucumber feature files. ##
5
5
  [Homepage](https://github.com/famished-tiger/Macros4Cuke)
6
6
 
7
- ###HOW?###
8
- See working examples in the features folder.
7
+ ## What is it? ##
8
+ Macros4Cuke gives you to ability to define a new Cucumber (macro-)step directly in a feature file
9
+ and to associate with it a sequence of steps to execute when the macro-step is used in
10
+ a scenario.
11
+
12
+ ## How can create such a macro? ##
13
+ Here follows an example taken from our demo files:
14
+
15
+ Given I define the step "When I [enter my userid {{userid}} and password {{password}}]" to mean:
16
+ """
17
+ Given I landed in the homepage
18
+ When I click "Sign in"
19
+ And I fill in "Username" with "{{userid}}"
20
+ And I fill in "Password" with "{{password}}"
21
+ And I click "Submit"
22
+ """
23
+
24
+ That macro step can be used in a scenario like this:
25
+ When I [enter my userid "jdoe" and password "hello-world"]
26
+
27
+
28
+ See also the working examples in the features folder.
29
+
30
+
31
+ ## What do I need to start? ##
32
+ * Install the macros4cuke gem:
33
+ - gem install macros4cuke
34
+
35
+ * In your 'env.rb' file
36
+ - 1. Load the modules and classes from the gem:
37
+ require 'macros4cuke'
38
+
39
+
40
+ - 2. Extend the world object like this:
41
+ World(Macros4Cuke::MacroStepSupport)
42
+
43
+
44
+ * In your 'step_definitions' folder
45
+ - 3. Import the macro-management steps.
46
+ Create a ruby file (say, 'use_macro_steps.rb').
47
+ Add the following line:
48
+ require 'macros4cuke/../macro_steps'
49
+
50
+ Your can start writing macros in your Cucumber project.
51
+
9
52
 
10
53
  Copyright
11
54
  ---------
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Macros4Cuke # Module used as a namespace
5
5
  # This constant keeps the current version of the gem.
6
- Version = '0.1.00'
6
+ Version = '0.1.02'
7
7
 
8
8
  Description = "Macros for Cucumber"
9
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: macros4cuke
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.00
4
+ version: 0.1.02
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: