macros4cuke 0.3.21 → 0.3.22

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- ## 0.3.20 / 2013-05-23
1
+ ## 0.3.22 / 2013-05-25
2
+ * [CHANGE] File `macro-collection_spec.rb`: Added one test for the `MacroCollection#render_steps` method.
3
+
4
+
5
+ ## 0.3.21 / 2013-05-24
2
6
  * [CHANGE] File `.rubocop.yml`: StringLiterals cop is now enabled.
3
7
  * [CHANGE] Many file: replaced double quotes by single quotes in order to pass the StringLiterals Robocop rule.
4
8
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  module Macros4Cuke # Module used as a namespace
6
6
  # The version number of the gem.
7
- Version = '0.3.21'
7
+ Version = '0.3.22'
8
8
 
9
9
  # Brief description of the gem.
10
10
  Description = 'Macros for Cucumber'
@@ -42,7 +42,7 @@ public
42
42
  # and (optionally) given a table of values.
43
43
  # Return the rendered steps as a text.
44
44
  # @param aPhrase [String] an instance of the macro phrase.
45
- # @param rawData [Array or nil] An Array with coupples of the form:
45
+ # @param rawData [Array or nil] An Array with couples of the form:
46
46
  # [macro argument name, a value].
47
47
  # Multiple rows with same argument name are acceptable.
48
48
  # @return [String]
@@ -43,6 +43,22 @@ SNIPPET
43
43
  ->(){ singleton.add_macro(*args) }.should
44
44
  raise_error(Macros4Cuke::DuplicateMacroError, msg)
45
45
  end
46
+
47
+ it 'should return the rendition of a given macro-step' do
48
+ phrase = '[enter my credentials]'
49
+ input_values = [ ['userid', 'nobody'], ['password', 'no-secret'] ]
50
+ rendered = singleton.render_steps(phrase, input_values)
51
+ expected = <<-SNIPPET
52
+ Given I landed in the homepage
53
+ When I click "Sign in"
54
+ And I fill in "Username" with "nobody"
55
+ And I fill in "Password" with "no-secret"
56
+ And I click "Submit"
57
+ SNIPPET
58
+ rendered.should == expected
59
+ end
60
+
61
+
46
62
  end
47
63
 
48
64
  end # describe
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.3.21
4
+ version: 0.3.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-24 00:00:00.000000000 Z
12
+ date: 2013-05-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber