spreewald 0.5.14 → 0.5.15

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/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spreewald (0.5.13)
4
+ spreewald (0.5.15)
5
5
  capybara
6
6
  cucumber
7
7
  cucumber-rails
@@ -20,36 +20,40 @@ end
20
20
  # Body: ...
21
21
  # Attachments: ...
22
22
  # """
23
- #
23
+ #
24
24
  # You can skip lines, of course.
25
25
  Then /^(an|no) e?mail should have been sent with:$/ do |mode, raw_data|
26
- raw_data.strip!
27
- conditions = {}.tap do |hash|
28
- raw_data.split("\n").each do |row|
29
- if row.match(/^[a-z]+: /i)
30
- key, value = row.split(": ", 2)
31
- hash[key.downcase.to_sym] = value
26
+ patiently do
27
+ raw_data.strip!
28
+ conditions = {}.tap do |hash|
29
+ raw_data.split("\n").each do |row|
30
+ if row.match(/^[a-z]+: /i)
31
+ key, value = row.split(": ", 2)
32
+ hash[key.downcase.to_sym] = value
33
+ end
32
34
  end
33
35
  end
36
+ @mail = MailFinder.find(conditions)
37
+ expectation = mode == 'no' ? 'should_not' : 'should'
38
+ @mail.send(expectation, be_present)
34
39
  end
35
- @mail = MailFinder.find(conditions)
36
- expectation = mode == 'no' ? 'should_not' : 'should'
37
- @mail.send(expectation, be_present)
38
40
  end
39
41
 
40
42
  # nodoc
41
43
  Then /^(an|no) e?mail should have been sent((?: |and|with|from "[^"]+"|bcc "[^"]+"|to "[^"]+"|the subject "[^"]+"|the body "[^"]+"|the attachments "[^"]+")+)$/ do |mode, query|
42
- conditions = {}
43
- conditions[:to] = $1 if query =~ /to "([^"]+)"/
44
- conditions[:cc] = $1 if query =~ / cc "([^"]+)"/
45
- conditions[:bcc] = $1 if query =~ /bcc "([^"]+)"/
46
- conditions[:from] = $1 if query =~ /from "([^"]+)"/
47
- conditions[:subject] = $1 if query =~ /the subject "([^"]+)"/
48
- conditions[:body] = $1 if query =~ /the body "([^"]+)"/
49
- conditions[:attachments] = $1 if query =~ /the attachments "([^"]+)"/
50
- @mail = MailFinder.find(conditions)
51
- expectation = mode == 'no' ? 'should_not' : 'should'
52
- @mail.send(expectation, be_present)
44
+ patiently do
45
+ conditions = {}
46
+ conditions[:to] = $1 if query =~ /to "([^"]+)"/
47
+ conditions[:cc] = $1 if query =~ / cc "([^"]+)"/
48
+ conditions[:bcc] = $1 if query =~ /bcc "([^"]+)"/
49
+ conditions[:from] = $1 if query =~ /from "([^"]+)"/
50
+ conditions[:subject] = $1 if query =~ /the subject "([^"]+)"/
51
+ conditions[:body] = $1 if query =~ /the body "([^"]+)"/
52
+ conditions[:attachments] = $1 if query =~ /the attachments "([^"]+)"/
53
+ @mail = MailFinder.find(conditions)
54
+ expectation = mode == 'no' ? 'should_not' : 'should'
55
+ @mail.send(expectation, be_present)
56
+ end
53
57
  end
54
58
 
55
59
  # Only works after you have retrieved the mail using "Then an email should have been sent with:"
@@ -88,9 +92,11 @@ end
88
92
  # All of these lines
89
93
  # need to be present
90
94
  # """
91
- Then /^that e?mail should have the following lines in the body:$/ do |body|
95
+ Then /^that e?mail should( not)? have the following lines in the body:$/ do |expectation, body|
96
+ expectation = negate ? 'should_not' : 'should'
97
+
92
98
  body.to_s.strip.split(/\n/).each do |line|
93
- @mail.body.should include(line.strip)
99
+ @mail.body.send(expectation, include(line.strip))
94
100
  end
95
101
  end
96
102
 
@@ -1,5 +1,5 @@
1
1
  # coding: UTF-8
2
2
 
3
3
  module Spreewald
4
- VERSION = "0.5.14"
4
+ VERSION = "0.5.15"
5
5
  end
@@ -3,5 +3,4 @@ cucumber:
3
3
  adapter: mysql2
4
4
  host: localhost
5
5
  username: root
6
- password: junior
7
-
6
+ password: secret
@@ -3,5 +3,4 @@ cucumber:
3
3
  adapter: mysql2
4
4
  host: localhost
5
5
  username: root
6
- password: junior
7
-
6
+ password: secret
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: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 14
10
- version: 0.5.14
9
+ - 15
10
+ version: 0.5.15
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tobias Kraze
@@ -15,13 +15,13 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-06-05 00:00:00 +02:00
19
- default_executable:
18
+ date: 2013-06-06 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
- name: cucumber-rails
23
21
  prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
22
+ name: cucumber-rails
23
+ type: :runtime
24
+ version_requirements: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
27
  - - ">="
@@ -30,12 +30,12 @@ dependencies:
30
30
  segments:
31
31
  - 0
32
32
  version: "0"
33
- type: :runtime
34
- version_requirements: *id001
33
+ requirement: *id001
35
34
  - !ruby/object:Gem::Dependency
36
- name: cucumber
37
35
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
36
+ name: cucumber
37
+ type: :runtime
38
+ version_requirements: &id002 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ">="
@@ -44,12 +44,12 @@ dependencies:
44
44
  segments:
45
45
  - 0
46
46
  version: "0"
47
- type: :runtime
48
- version_requirements: *id002
47
+ requirement: *id002
49
48
  - !ruby/object:Gem::Dependency
50
- name: capybara
51
49
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
50
+ name: capybara
51
+ type: :runtime
52
+ version_requirements: &id003 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ">="
@@ -58,8 +58,7 @@ dependencies:
58
58
  segments:
59
59
  - 0
60
60
  version: "0"
61
- type: :runtime
62
- version_requirements: *id003
61
+ requirement: *id003
63
62
  description: A collection of cucumber steps we use in our projects, including steps to check HTML, tables, emails and some utility methods.
64
63
  email:
65
64
  - tobias@kraze.eu
@@ -140,7 +139,6 @@ files:
140
139
  - tests/shared/features/shared/step_definitions/test_steps.rb
141
140
  - tests/shared/features/shared/tables.feature
142
141
  - tests/shared/features/support/paths.rb
143
- has_rdoc: true
144
142
  homepage: https://github.com/makandra/spreewald
145
143
  licenses: []
146
144
 
@@ -170,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
168
  requirements: []
171
169
 
172
170
  rubyforge_project:
173
- rubygems_version: 1.3.9.5
171
+ rubygems_version: 1.8.24
174
172
  signing_key:
175
173
  specification_version: 3
176
174
  summary: Collection of useful cucumber steps.