spreewald 0.8.6 → 0.9.0

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.
data/README.md CHANGED
@@ -69,7 +69,7 @@ Marks scenario as pending
69
69
 
70
70
  * **Then debugger**
71
71
 
72
- Starts debugger
72
+ Starts debugger, or Pry if installed
73
73
 
74
74
 
75
75
  * **@slow**
@@ -378,6 +378,11 @@ deprecation notice. Decide for yourself whether you want to use them:
378
378
  Checks that an input field contains some value (allowing * as wildcard character)
379
379
 
380
380
 
381
+ * **Then(the "(.*?)" field should (not )?contain:)**
382
+
383
+ Checks that a multiline textarea contains some value (allowing * as wildcard character)
384
+
385
+
381
386
  * **Then I should see a form with the following values:**
382
387
 
383
388
  Checks that a list of label/value pairs are visible as control inputs.
@@ -165,6 +165,15 @@ Then /^the "([^"]*)" field should (not )?contain "([^"]*)"$/ do |label, negate,
165
165
  end
166
166
  end
167
167
 
168
+ # Checks that a multiline textarea contains some value (allowing * as wildcard character)
169
+ Then(/^the "(.*?)" field should (not )?contain:$/) do |label, negate, expected_string|
170
+ patiently do
171
+ field = find_field(label)
172
+ field.value.chomp.send(negate ? :should_not : :should, contain_with_wildcards(expected_string))
173
+ end
174
+ end
175
+
176
+
168
177
 
169
178
  # Checks that a list of label/value pairs are visible as control inputs.
170
179
  #
@@ -1,3 +1,3 @@
1
1
  module Spreewald
2
- VERSION = '0.8.6'
2
+ VERSION = '0.9.0'
3
3
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- spreewald (0.8.4)
4
+ spreewald (0.8.6)
5
5
  capybara
6
6
  cucumber
7
7
  cucumber-rails
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- spreewald (0.8.4)
4
+ spreewald (0.8.6)
5
5
  capybara
6
6
  cucumber
7
7
  cucumber-rails
@@ -0,0 +1,11 @@
1
+ = form_tag do
2
+
3
+ = label_tag 'text_control', 'Text control'
4
+ = text_field_tag 'text_control', 'Text control value'
5
+
6
+ = label_tag 'textarea_control', 'Textarea control'
7
+ = text_area_tag 'textarea_control', "Textarea control line 1\nTextarea control line 2\n"
8
+
9
+ = label_tag 'empty_textarea_control', 'Empty textarea control'
10
+ = text_area_tag 'empty_textarea_control', ""
11
+
@@ -1,16 +1,30 @@
1
1
  Feature: Web steps
2
2
 
3
- Background:
4
- When I go to "/forms/form1"
5
-
6
3
  Scenario: /^the "([^"]*)" field should (not )?contain "([^"]*)"$/
4
+ When I go to "/forms/form1"
7
5
  Then the "Text control" field should contain "Text control value"
8
6
  Then the "Select control" field should contain "Label 2"
9
7
  Then the "Select control without selection" field should contain "Label 1"
10
8
  Then the "Textarea control" field should contain "Textarea control value"
11
9
  Then the "Empty control" field should contain ""
12
10
 
11
+ Scenario: /^the "([^"]*)" field should (not )?contain:/
12
+ When I go to "/forms/form2"
13
+ Then the "Text control" field should contain:
14
+ """
15
+ Text control value
16
+ """
17
+ Then the "Textarea control" field should contain:
18
+ """
19
+ Textarea control line 1
20
+ Textarea control line 2
21
+ """
22
+ Then the "Empty textarea control" field should contain:
23
+ """
24
+ """
25
+
13
26
  Scenario: /^I should see a form with the following values:$/
27
+ When I go to "/forms/form1"
14
28
  Then I should see a form with the following values:
15
29
  | Text control | Text control value |
16
30
  | Select control | Label 2 |
@@ -19,6 +33,7 @@ Feature: Web steps
19
33
  | Empty control | |
20
34
 
21
35
  Scenario: /^"([^"]*)" should be selected for "([^"]*)"$/
36
+ When I go to "/forms/form1"
22
37
  Then "Label 2" should be selected for "Select control"
23
38
  Then "Label 1" should be selected for "Select control without selection"
24
39
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spreewald
3
3
  version: !ruby/object:Gem::Version
4
- hash: 51
4
+ hash: 59
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 8
9
- - 6
10
- version: 0.8.6
8
+ - 9
9
+ - 0
10
+ version: 0.9.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tobias Kraze
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2014-01-20 00:00:00 +01:00
18
+ date: 2014-02-12 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -134,6 +134,7 @@ files:
134
134
  - tests/shared/app/controllers/tables_controller.rb
135
135
  - tests/shared/app/models/mailer.rb
136
136
  - tests/shared/app/views/forms/form1.html.haml
137
+ - tests/shared/app/views/forms/form2.html.haml
137
138
  - tests/shared/app/views/layouts/application.html.haml
138
139
  - tests/shared/app/views/tables/table1.html.haml
139
140
  - tests/shared/config/database.yml
@@ -218,6 +219,7 @@ test_files:
218
219
  - tests/shared/app/controllers/tables_controller.rb
219
220
  - tests/shared/app/models/mailer.rb
220
221
  - tests/shared/app/views/forms/form1.html.haml
222
+ - tests/shared/app/views/forms/form2.html.haml
221
223
  - tests/shared/app/views/layouts/application.html.haml
222
224
  - tests/shared/app/views/tables/table1.html.haml
223
225
  - tests/shared/config/database.yml