email_spec 1.2.1 → 1.4.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.
Files changed (97) hide show
  1. data/History.txt +17 -1
  2. data/README.md +340 -0
  3. data/Rakefile +3 -50
  4. data/lib/email_spec.rb +3 -2
  5. data/lib/email_spec/email_viewer.rb +10 -6
  6. data/lib/email_spec/errors.rb +7 -0
  7. data/lib/email_spec/helpers.rb +5 -3
  8. data/lib/email_spec/matchers.rb +166 -66
  9. data/rails_generators/email_spec/templates/email_steps.rb +1 -1
  10. metadata +290 -236
  11. data/README.rdoc +0 -148
  12. data/examples/rails3_root/Gemfile +0 -17
  13. data/examples/rails3_root/Gemfile.lock +0 -135
  14. data/examples/rails3_root/README +0 -5
  15. data/examples/rails3_root/Rakefile +0 -11
  16. data/examples/rails3_root/app/controllers/application_controller.rb +0 -3
  17. data/examples/rails3_root/app/controllers/welcome_controller.rb +0 -16
  18. data/examples/rails3_root/app/helpers/application_helper.rb +0 -2
  19. data/examples/rails3_root/app/mailers/user_mailer.rb +0 -39
  20. data/examples/rails3_root/app/models/user.rb +0 -2
  21. data/examples/rails3_root/app/views/user_mailer/attachments.html.erb +0 -6
  22. data/examples/rails3_root/app/views/user_mailer/newsletter.html.erb +0 -8
  23. data/examples/rails3_root/app/views/user_mailer/signup.html.erb +0 -4
  24. data/examples/rails3_root/app/views/user_mailer/signup.text.erb +0 -4
  25. data/examples/rails3_root/app/views/welcome/attachments.html.erb +0 -0
  26. data/examples/rails3_root/app/views/welcome/confirm.html.erb +0 -1
  27. data/examples/rails3_root/app/views/welcome/index.html.erb +0 -8
  28. data/examples/rails3_root/app/views/welcome/newsletter.html.erb +0 -0
  29. data/examples/rails3_root/app/views/welcome/signup.html.erb +0 -1
  30. data/examples/rails3_root/attachments/document.pdf +0 -0
  31. data/examples/rails3_root/attachments/image.png +0 -0
  32. data/examples/rails3_root/config.ru +0 -4
  33. data/examples/rails3_root/config/application.rb +0 -43
  34. data/examples/rails3_root/config/boot.rb +0 -14
  35. data/examples/rails3_root/config/cucumber.yml +0 -8
  36. data/examples/rails3_root/config/database.yml +0 -25
  37. data/examples/rails3_root/config/environment.rb +0 -6
  38. data/examples/rails3_root/config/environments/development.rb +0 -20
  39. data/examples/rails3_root/config/environments/production.rb +0 -42
  40. data/examples/rails3_root/config/environments/test.rb +0 -30
  41. data/examples/rails3_root/config/initializers/backtrace_silencers.rb +0 -7
  42. data/examples/rails3_root/config/initializers/cookie_verification_secret.rb +0 -7
  43. data/examples/rails3_root/config/initializers/delayed_job.rb +0 -1
  44. data/examples/rails3_root/config/initializers/inflections.rb +0 -10
  45. data/examples/rails3_root/config/initializers/mime_types.rb +0 -5
  46. data/examples/rails3_root/config/initializers/notifier_job.rb +0 -1
  47. data/examples/rails3_root/config/initializers/rspec_generator.rb +0 -6
  48. data/examples/rails3_root/config/initializers/session_store.rb +0 -10
  49. data/examples/rails3_root/config/locales/en.yml +0 -5
  50. data/examples/rails3_root/config/routes.rb +0 -7
  51. data/examples/rails3_root/db/migrate/20090125013728_create_users.rb +0 -11
  52. data/examples/rails3_root/db/migrate/20090908054656_create_delayed_jobs.rb +0 -20
  53. data/examples/rails3_root/db/schema.rb +0 -33
  54. data/examples/rails3_root/db/seeds.rb +0 -7
  55. data/examples/rails3_root/doc/README_FOR_APP +0 -2
  56. data/examples/rails3_root/features/attachments.feature +0 -27
  57. data/examples/rails3_root/features/delayed_job.feature +0 -13
  58. data/examples/rails3_root/features/errors.feature +0 -40
  59. data/examples/rails3_root/features/example.feature +0 -93
  60. data/examples/rails3_root/features/step_definitions/user_steps.rb +0 -26
  61. data/examples/rails3_root/features/step_definitions/web_steps.rb +0 -219
  62. data/examples/rails3_root/features/support/env.rb +0 -58
  63. data/examples/rails3_root/features/support/env_ext.rb +0 -2
  64. data/examples/rails3_root/features/support/paths.rb +0 -33
  65. data/examples/rails3_root/lib/notifier_job.rb +0 -5
  66. data/examples/rails3_root/lib/tasks/cucumber.rake +0 -53
  67. data/examples/rails3_root/lib/tasks/rspec.rake +0 -69
  68. data/examples/rails3_root/public/404.html +0 -26
  69. data/examples/rails3_root/public/422.html +0 -26
  70. data/examples/rails3_root/public/500.html +0 -26
  71. data/examples/rails3_root/public/favicon.ico +0 -0
  72. data/examples/rails3_root/public/images/rails.png +0 -0
  73. data/examples/rails3_root/public/javascripts/application.js +0 -2
  74. data/examples/rails3_root/public/javascripts/controls.js +0 -965
  75. data/examples/rails3_root/public/javascripts/dragdrop.js +0 -974
  76. data/examples/rails3_root/public/javascripts/effects.js +0 -1123
  77. data/examples/rails3_root/public/javascripts/prototype.js +0 -4874
  78. data/examples/rails3_root/public/javascripts/rails.js +0 -109
  79. data/examples/rails3_root/public/robots.txt +0 -5
  80. data/examples/rails3_root/script/cucumber +0 -10
  81. data/examples/rails3_root/script/rails +0 -9
  82. data/examples/rails3_root/spec/controllers/welcome_controller_spec.rb +0 -20
  83. data/examples/rails3_root/spec/models/user_mailer_spec.rb +0 -47
  84. data/examples/rails3_root/spec/spec_helper.rb +0 -19
  85. data/examples/sinatra_root/config.ru +0 -4
  86. data/examples/sinatra_root/features/errors.feature +0 -40
  87. data/examples/sinatra_root/features/example.feature +0 -93
  88. data/examples/sinatra_root/features/step_definitions/user_steps.rb +0 -26
  89. data/examples/sinatra_root/features/step_definitions/web_steps.rb +0 -219
  90. data/examples/sinatra_root/features/support/env.rb +0 -21
  91. data/examples/sinatra_root/features/support/paths.rb +0 -29
  92. data/examples/sinatra_root/lib/example_sinatra_app.rb +0 -45
  93. data/install.rb +0 -0
  94. data/spec/email_spec/helpers_spec.rb +0 -220
  95. data/spec/email_spec/mail_ext_spec.rb +0 -34
  96. data/spec/email_spec/matchers_spec.rb +0 -486
  97. data/spec/spec_helper.rb +0 -16
@@ -0,0 +1,7 @@
1
+ module EmailSpec
2
+ class CouldNotFindEmailError < StandardError
3
+ end
4
+
5
+ class NoEmailAddressProvided < StandardError
6
+ end
7
+ end
@@ -80,9 +80,11 @@ module EmailSpec
80
80
 
81
81
  def find_email!(address, opts={})
82
82
  email = find_email(address, opts)
83
- if email.nil?
84
- error = "#{opts.keys.first.to_s.humanize unless opts.empty?} #{('"' + opts.values.first.to_s.humanize + '"') unless opts.empty?}"
85
- raise RSpec::Expectations::ExpectationNotMetError, "Could not find email #{error}. \n Found the following emails:\n\n #{all_emails.to_s}"
83
+ if current_email_address.nil?
84
+ raise EmailSpec::NoEmailAddressProvided, "No email address has been provided. Make sure current_email_address is returning something."
85
+ elsif email.nil?
86
+ error = "#{opts.keys.first.to_s.humanize.downcase unless opts.empty?} #{('"' + opts.values.first.to_s + '"') unless opts.empty?}"
87
+ raise EmailSpec::CouldNotFindEmailError, "Could not find email #{error} in the mailbox for #{current_email_address}. \n Found the following emails:\n\n #{all_emails.to_s}"
86
88
  end
87
89
  email
88
90
  end
@@ -164,92 +164,192 @@ module EmailSpec
164
164
  CcTo.new(expected_email_addresses_or_objects_that_respond_to_email.flatten)
165
165
  end
166
166
 
167
- RSpec::Matchers.define :have_subject do
168
- match do |given|
169
- given_subject = given.subject
170
- expected_subject = expected.first
171
-
172
- if expected_subject.is_a?(String)
173
- description { "have subject of #{expected_subject.inspect}" }
174
- failure_message_for_should { "expected the subject to be #{expected_subject.inspect} but was #{given_subject.inspect}" }
175
- failure_message_for_should_not { "expected the subject not to be #{expected_subject.inspect} but was" }
176
-
177
- given_subject == expected_subject
167
+ class HaveSubject
168
+
169
+ def initialize(subject)
170
+ @expected_subject = subject
171
+ end
172
+
173
+ def description
174
+ if @expected_subject.is_a?(String)
175
+ "have subject of #{@expected_subject.inspect}"
178
176
  else
179
- description { "have subject matching #{expected_subject.inspect}" }
180
- failure_message_for_should { "expected the subject to match #{expected_subject.inspect}, but did not. Actual subject was: #{given_subject.inspect}" }
181
- failure_message_for_should_not { "expected the subject not to match #{expected_subject.inspect} but #{given_subject.inspect} does match it." }
177
+ "have subject matching #{@expected_subject.inspect}"
178
+ end
179
+ end
182
180
 
183
- !!(given_subject =~ expected_subject)
181
+ def matches?(email)
182
+ @given_subject = email.subject
183
+ if @expected_subject.is_a?(String)
184
+ @given_subject == @expected_subject
185
+ else
186
+ !!(@given_subject =~ @expected_subject)
187
+ end
188
+ end
189
+
190
+ def failure_message
191
+ if @expected_subject.is_a?(String)
192
+ "expected the subject to be #{@expected_subject.inspect} but was #{@given_subject.inspect}"
193
+ else
194
+ "expected the subject to match #{@expected_subject.inspect}, but did not. Actual subject was: #{@given_subject.inspect}"
195
+ end
196
+ end
197
+
198
+ def negative_failure_message
199
+ if @expected_subject.is_a?(String)
200
+ "expected the subject not to be #{@expected_subject.inspect} but was"
201
+ else
202
+ "expected the subject not to match #{@expected_subject.inspect} but #{@given_subject.inspect} does match it."
184
203
  end
185
204
  end
186
205
  end
187
-
188
- RSpec::Matchers.define :include_email_with_subject do
189
- match do |given_emails|
190
- expected_subject = expected.first
191
-
192
- if expected_subject.is_a?(String)
193
- description { "include email with subject of #{expected_subject.inspect}" }
194
- failure_message_for_should { "expected at least one email to have the subject #{expected_subject.inspect} but none did. Subjects were #{given_emails.map(&:subject).inspect}" }
195
- failure_message_for_should_not { "expected no email with the subject #{expected_subject.inspect} but found at least one. Subjects were #{given_emails.map(&:subject).inspect}" }
196
-
197
- given_emails.map(&:subject).include?(expected_subject)
206
+
207
+ def have_subject(subject)
208
+ HaveSubject.new(subject)
209
+ end
210
+
211
+ class IncludeEmailWithSubject
212
+
213
+ def initialize(subject)
214
+ @expected_subject = subject
215
+ end
216
+
217
+ def description
218
+ if @expected_subject.is_a?(String)
219
+ "include email with subject of #{@expected_subject.inspect}"
198
220
  else
199
- description { "include email with subject matching #{expected_subject.inspect}" }
200
- failure_message_for_should { "expected at least one email to have a subject matching #{expected_subject.inspect}, but none did. Subjects were #{given_emails.map(&:subject).inspect}" }
201
- failure_message_for_should_not { "expected no email to have a subject matching #{expected_subject.inspect} but found at least one. Subjects were #{given_emails.map(&:subject).inspect}" }
202
-
203
- !!(given_emails.any?{ |mail| mail.subject =~ expected_subject })
221
+ "include email with subject matching #{@expected_subject.inspect}"
222
+ end
223
+ end
224
+
225
+ def matches?(emails)
226
+ @given_emails = emails
227
+ if @expected_subject.is_a?(String)
228
+ @given_emails.map(&:subject).include?(@expected_subject)
229
+ else
230
+ !!(@given_emails.any?{ |mail| mail.subject =~ @expected_subject })
231
+ end
232
+ end
233
+
234
+ def failure_message
235
+ if @expected_subject.is_a?(String)
236
+ "expected at least one email to have the subject #{@expected_subject.inspect} but none did. Subjects were #{@given_emails.map(&:subject).inspect}"
237
+ else
238
+ "expected at least one email to have a subject matching #{@expected_subject.inspect}, but none did. Subjects were #{@given_emails.map(&:subject).inspect}"
239
+ end
240
+ end
241
+
242
+ def negative_failure_message
243
+ if @expected_subject.is_a?(String)
244
+ "expected no email with the subject #{@expected_subject.inspect} but found at least one. Subjects were #{@given_emails.map(&:subject).inspect}"
245
+ else
246
+ "expected no email to have a subject matching #{@expected_subject.inspect} but found at least one. Subjects were #{@given_emails.map(&:subject).inspect}"
204
247
  end
205
248
  end
206
249
  end
207
250
 
208
- RSpec::Matchers.define :have_body_text do
209
- match do |given|
210
- expected_text = expected.first
211
-
212
- if expected_text.is_a?(String)
213
- normalized_body = given.default_part_body.to_s.gsub(/\s+/, " ")
214
- normalized_expected = expected_text.gsub(/\s+/, " ")
215
- description { "have body including #{normalized_expected.inspect}" }
216
- failure_message_for_should { "expected the body to contain #{normalized_expected.inspect} but was #{normalized_body.inspect}" }
217
- failure_message_for_should_not { "expected the body not to contain #{normalized_expected.inspect} but was #{normalized_body.inspect}" }
218
-
219
- normalized_body.include?(normalized_expected)
251
+ def include_email_with_subject(*emails)
252
+ IncludeEmailWithSubject.new(emails.flatten.first)
253
+ end
254
+
255
+ class HaveBodyText
256
+
257
+ def initialize(text)
258
+ @expected_text = text
259
+ end
260
+
261
+ def description
262
+ if @expected_text.is_a?(String)
263
+ "have body including #{@expected_text.inspect}"
220
264
  else
221
- given_body = given.default_part_body.to_s
222
- description { "have body matching #{expected_text.inspect}" }
223
- failure_message_for_should { "expected the body to match #{expected_text.inspect}, but did not. Actual body was: #{given_body.inspect}" }
224
- failure_message_for_should_not { "expected the body not to match #{expected_text.inspect} but #{given_body.inspect} does match it." }
225
-
226
- !!(given_body =~ expected_text)
265
+ "have body matching #{@expected_text.inspect}"
266
+ end
267
+ end
268
+
269
+ def matches?(email)
270
+ if @expected_text.is_a?(String)
271
+ @given_text = email.default_part_body.to_s.gsub(/\s+/, " ")
272
+ @expected_text = @expected_text.gsub(/\s+/, " ")
273
+ @given_text.include?(@expected_text)
274
+ else
275
+ @given_text = email.default_part_body.to_s
276
+ !!(@given_text =~ @expected_text)
277
+ end
278
+ end
279
+
280
+ def failure_message
281
+ if @expected_text.is_a?(String)
282
+ "expected the body to contain #{@expected_text.inspect} but was #{@given_text.inspect}"
283
+ else
284
+ "expected the body to match #{@expected_text.inspect}, but did not. Actual body was: #{@given_text.inspect}"
285
+ end
286
+ end
287
+
288
+ def negative_failure_message
289
+ if @expected_text.is_a?(String)
290
+ "expected the body not to contain #{@expected_text.inspect} but was #{@given_text.inspect}"
291
+ else
292
+ "expected the body not to match #{@expected_text.inspect} but #{@given_text.inspect} does match it."
227
293
  end
228
294
  end
229
295
  end
230
296
 
231
- def mail_headers_hash(email_headers)
232
- email_headers.fields.inject({}) { |hash, field| hash[field.field.class::FIELD_NAME] = field.to_s; hash }
297
+ def have_body_text(text)
298
+ HaveBodyText.new(text)
233
299
  end
234
300
 
235
- RSpec::Matchers.define :have_header do
236
- match do |given|
237
- given_header = given.header
238
- expected_name, expected_value = *expected
301
+ class HaveHeader
302
+
303
+ def initialize(name, value)
304
+ @expected_name, @expected_value = name, value
305
+ end
306
+
307
+ def description
308
+ if @expected_value.is_a?(String)
309
+ "have header #{@expected_name}: #{@expected_value}"
310
+ else
311
+ "have header #{@expected_name} with value matching #{@expected_value.inspect}"
312
+ end
313
+ end
239
314
 
240
- if expected_value.is_a?(String)
241
- description { "have header #{expected_name}: #{expected_value}" }
315
+ def matches?(email)
316
+ @given_header = email.header
242
317
 
243
- failure_message_for_should { "expected the headers to include '#{expected_name}: #{expected_value}' but they were #{mail_headers_hash(given_header).inspect}" }
244
- failure_message_for_should_not { "expected the headers not to include '#{expected_name}: #{expected_value}' but they were #{mail_headers_hash(given_header).inspect}" }
245
-
246
- given_header[expected_name].to_s == expected_value
318
+ if @expected_value.is_a?(String)
319
+ @given_header[@expected_name].to_s == @expected_value
247
320
  else
248
- description { "have header #{expected_name} with value matching #{expected_value.inspect}" }
249
- failure_message_for_should { "expected the headers to include '#{expected_name}' with a value matching #{expected_value.inspect} but they were #{mail_headers_hash(given_header).inspect}" }
250
- failure_message_for_should_not { "expected the headers not to include '#{expected_name}' with a value matching #{expected_value.inspect} but they were #{mail_headers_hash(given_header).inspect}" }
251
-
252
- given_header[expected_name].to_s =~ expected_value
321
+ @given_header[@expected_name].to_s =~ @expected_value
322
+ end end
323
+
324
+ def failure_message
325
+ if @expected_value.is_a?(String)
326
+ "expected the headers to include '#{@expected_name}: #{@expected_value}' but they were #{mail_headers_hash(@given_header).inspect}"
327
+ else
328
+ "expected the headers to include '#{@expected_name}' with a value matching #{@expected_value.inspect} but they were #{mail_headers_hash(@given_header).inspect}"
329
+ end
330
+ end
331
+
332
+ def negative_failure_message
333
+ if @expected_value.is_a?(String)
334
+ "expected the headers not to include '#{@expected_name}: #{@expected_value}' but they were #{mail_headers_hash(@given_header).inspect}"
335
+ else
336
+ "expected the headers not to include '#{@expected_name}' with a value matching #{@expected_value.inspect} but they were #{mail_headers_hash(@given_header).inspect}"
337
+ end
338
+ end
339
+
340
+ def mail_headers_hash(email_headers)
341
+ email_headers.fields.inject({}) { |hash, field| hash[field.field.class::FIELD_NAME] = field.to_s; hash }
342
+ end
343
+ end
344
+
345
+ def have_header(name, value)
346
+ HaveHeader.new(name, value)
347
+ end
348
+
349
+ def self.included base
350
+ if base.respond_to? :register_matcher
351
+ instance_methods.each do |name|
352
+ base.register_matcher name, name
253
353
  end
254
354
  end
255
355
  end
@@ -26,7 +26,7 @@
26
26
 
27
27
  module EmailHelpers
28
28
  def current_email_address
29
- # Replace with your a way to find your current email. e.g @current_user.email
29
+ # Replace with your way to find your current email (e.g @current_user.email).
30
30
  # last_email_address will return the last email address used by email spec to find an email.
31
31
  # Note that last_email_address will be reset after each Scenario.
32
32
  last_email_address || "example@example.com"
metadata CHANGED
@@ -1,70 +1,302 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: email_spec
3
- version: !ruby/object:Gem::Version
4
- hash: 29
5
- prerelease: false
6
- segments:
7
- - 1
8
- - 2
9
- - 1
10
- version: 1.2.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.4.0
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Ben Mabey
14
9
  - Aaron Gibralter
15
10
  - Mischa Fierer
16
11
  autorequire:
17
12
  bindir: bin
18
13
  cert_chain: []
19
-
20
- date: 2011-06-20 00:00:00 -06:00
21
- default_executable:
22
- dependencies:
23
- - !ruby/object:Gem::Dependency
14
+ date: 2012-04-08 00:00:00.000000000 Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: launchy
18
+ requirement: !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ~>
22
+ - !ruby/object:Gem::Version
23
+ version: '2.1'
24
24
  type: :runtime
25
25
  prerelease: false
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ none: false
28
+ requirements:
29
+ - - ~>
30
+ - !ruby/object:Gem::Version
31
+ version: '2.1'
32
+ - !ruby/object:Gem::Dependency
26
33
  name: mail
27
- version_requirements: &id001 !ruby/object:Gem::Requirement
34
+ requirement: !ruby/object:Gem::Requirement
28
35
  none: false
29
- requirements:
36
+ requirements:
30
37
  - - ~>
31
- - !ruby/object:Gem::Version
32
- hash: 7
33
- segments:
34
- - 2
35
- - 2
36
- version: "2.2"
37
- requirement: *id001
38
- - !ruby/object:Gem::Dependency
38
+ - !ruby/object:Gem::Version
39
+ version: '2.2'
39
40
  type: :runtime
40
41
  prerelease: false
41
- name: rspec
42
- version_requirements: &id002 !ruby/object:Gem::Requirement
42
+ version_requirements: !ruby/object:Gem::Requirement
43
43
  none: false
44
- requirements:
44
+ requirements:
45
45
  - - ~>
46
- - !ruby/object:Gem::Version
47
- hash: 3
48
- segments:
49
- - 2
50
- - 0
51
- version: "2.0"
52
- requirement: *id002
46
+ - !ruby/object:Gem::Version
47
+ version: '2.2'
48
+ - !ruby/object:Gem::Dependency
49
+ name: rake
50
+ requirement: !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: 0.8.7
56
+ type: :development
57
+ prerelease: false
58
+ version_requirements: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
63
+ version: 0.8.7
64
+ - !ruby/object:Gem::Dependency
65
+ name: cucumber
66
+ requirement: !ruby/object:Gem::Requirement
67
+ none: false
68
+ requirements:
69
+ - - ! '>='
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ type: :development
73
+ prerelease: false
74
+ version_requirements: !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ! '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ - !ruby/object:Gem::Dependency
81
+ name: cucumber-rails
82
+ requirement: !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - ! '>='
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ - !ruby/object:Gem::Dependency
97
+ name: cucumber-sinatra
98
+ requirement: !ruby/object:Gem::Requirement
99
+ none: false
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - ! '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: rspec-rails
114
+ requirement: !ruby/object:Gem::Requirement
115
+ none: false
116
+ requirements:
117
+ - - ! '>='
118
+ - !ruby/object:Gem::Version
119
+ version: 2.0.1
120
+ type: :development
121
+ prerelease: false
122
+ version_requirements: !ruby/object:Gem::Requirement
123
+ none: false
124
+ requirements:
125
+ - - ! '>='
126
+ - !ruby/object:Gem::Version
127
+ version: 2.0.1
128
+ - !ruby/object:Gem::Dependency
129
+ name: delayed_job
130
+ requirement: !ruby/object:Gem::Requirement
131
+ none: false
132
+ requirements:
133
+ - - ~>
134
+ - !ruby/object:Gem::Version
135
+ version: '2.0'
136
+ type: :development
137
+ prerelease: false
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ none: false
140
+ requirements:
141
+ - - ~>
142
+ - !ruby/object:Gem::Version
143
+ version: '2.0'
144
+ - !ruby/object:Gem::Dependency
145
+ name: pony
146
+ requirement: !ruby/object:Gem::Requirement
147
+ none: false
148
+ requirements:
149
+ - - ! '>='
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ type: :development
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ none: false
156
+ requirements:
157
+ - - ! '>='
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ - !ruby/object:Gem::Dependency
161
+ name: sinatra
162
+ requirement: !ruby/object:Gem::Requirement
163
+ none: false
164
+ requirements:
165
+ - - ! '>='
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ type: :development
169
+ prerelease: false
170
+ version_requirements: !ruby/object:Gem::Requirement
171
+ none: false
172
+ requirements:
173
+ - - ! '>='
174
+ - !ruby/object:Gem::Version
175
+ version: '0'
176
+ - !ruby/object:Gem::Dependency
177
+ name: rack-test
178
+ requirement: !ruby/object:Gem::Requirement
179
+ none: false
180
+ requirements:
181
+ - - ! '>='
182
+ - !ruby/object:Gem::Version
183
+ version: '0'
184
+ type: :development
185
+ prerelease: false
186
+ version_requirements: !ruby/object:Gem::Requirement
187
+ none: false
188
+ requirements:
189
+ - - ! '>='
190
+ - !ruby/object:Gem::Version
191
+ version: '0'
192
+ - !ruby/object:Gem::Dependency
193
+ name: mail
194
+ requirement: !ruby/object:Gem::Requirement
195
+ none: false
196
+ requirements:
197
+ - - ! '>='
198
+ - !ruby/object:Gem::Version
199
+ version: '0'
200
+ type: :development
201
+ prerelease: false
202
+ version_requirements: !ruby/object:Gem::Requirement
203
+ none: false
204
+ requirements:
205
+ - - ! '>='
206
+ - !ruby/object:Gem::Version
207
+ version: '0'
208
+ - !ruby/object:Gem::Dependency
209
+ name: rails
210
+ requirement: !ruby/object:Gem::Requirement
211
+ none: false
212
+ requirements:
213
+ - - '='
214
+ - !ruby/object:Gem::Version
215
+ version: 3.0.7
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ none: false
220
+ requirements:
221
+ - - '='
222
+ - !ruby/object:Gem::Version
223
+ version: 3.0.7
224
+ - !ruby/object:Gem::Dependency
225
+ name: sqlite3
226
+ requirement: !ruby/object:Gem::Requirement
227
+ none: false
228
+ requirements:
229
+ - - ! '>='
230
+ - !ruby/object:Gem::Version
231
+ version: '0'
232
+ type: :development
233
+ prerelease: false
234
+ version_requirements: !ruby/object:Gem::Requirement
235
+ none: false
236
+ requirements:
237
+ - - ! '>='
238
+ - !ruby/object:Gem::Version
239
+ version: '0'
240
+ - !ruby/object:Gem::Dependency
241
+ name: capybara
242
+ requirement: !ruby/object:Gem::Requirement
243
+ none: false
244
+ requirements:
245
+ - - ! '>='
246
+ - !ruby/object:Gem::Version
247
+ version: '0'
248
+ type: :development
249
+ prerelease: false
250
+ version_requirements: !ruby/object:Gem::Requirement
251
+ none: false
252
+ requirements:
253
+ - - ! '>='
254
+ - !ruby/object:Gem::Version
255
+ version: '0'
256
+ - !ruby/object:Gem::Dependency
257
+ name: database_cleaner
258
+ requirement: !ruby/object:Gem::Requirement
259
+ none: false
260
+ requirements:
261
+ - - ! '>='
262
+ - !ruby/object:Gem::Version
263
+ version: '0'
264
+ type: :development
265
+ prerelease: false
266
+ version_requirements: !ruby/object:Gem::Requirement
267
+ none: false
268
+ requirements:
269
+ - - ! '>='
270
+ - !ruby/object:Gem::Version
271
+ version: '0'
272
+ - !ruby/object:Gem::Dependency
273
+ name: test-unit
274
+ requirement: !ruby/object:Gem::Requirement
275
+ none: false
276
+ requirements:
277
+ - - ! '>='
278
+ - !ruby/object:Gem::Version
279
+ version: '0'
280
+ type: :development
281
+ prerelease: false
282
+ version_requirements: !ruby/object:Gem::Requirement
283
+ none: false
284
+ requirements:
285
+ - - ! '>='
286
+ - !ruby/object:Gem::Version
287
+ version: '0'
53
288
  description: Easily test email in rspec and cucumber
54
289
  email: ben@benmabey.com
55
290
  executables: []
56
-
57
291
  extensions: []
58
-
59
- extra_rdoc_files:
292
+ extra_rdoc_files:
293
+ - README.md
60
294
  - MIT-LICENSE.txt
61
- - README.rdoc
62
- files:
295
+ files:
296
+ - README.md
63
297
  - History.txt
64
298
  - MIT-LICENSE.txt
65
- - README.rdoc
66
299
  - Rakefile
67
- - install.rb
68
300
  - lib/email-spec.rb
69
301
  - lib/email_spec.rb
70
302
  - lib/email_spec/address_converter.rb
@@ -72,6 +304,7 @@ files:
72
304
  - lib/email_spec/cucumber.rb
73
305
  - lib/email_spec/deliveries.rb
74
306
  - lib/email_spec/email_viewer.rb
307
+ - lib/email_spec/errors.rb
75
308
  - lib/email_spec/helpers.rb
76
309
  - lib/email_spec/mail_ext.rb
77
310
  - lib/email_spec/matchers.rb
@@ -81,208 +314,29 @@ files:
81
314
  - lib/generators/email_spec/steps/templates/email_steps.rb
82
315
  - rails_generators/email_spec/email_spec_generator.rb
83
316
  - rails_generators/email_spec/templates/email_steps.rb
84
- - spec/email_spec/helpers_spec.rb
85
- - spec/email_spec/mail_ext_spec.rb
86
- - spec/email_spec/matchers_spec.rb
87
- - spec/spec_helper.rb
88
- - examples/rails3_root/app/controllers/application_controller.rb
89
- - examples/rails3_root/app/controllers/welcome_controller.rb
90
- - examples/rails3_root/app/helpers/application_helper.rb
91
- - examples/rails3_root/app/mailers/user_mailer.rb
92
- - examples/rails3_root/app/models/user.rb
93
- - examples/rails3_root/app/views/user_mailer/attachments.html.erb
94
- - examples/rails3_root/app/views/user_mailer/newsletter.html.erb
95
- - examples/rails3_root/app/views/user_mailer/signup.html.erb
96
- - examples/rails3_root/app/views/user_mailer/signup.text.erb
97
- - examples/rails3_root/app/views/welcome/attachments.html.erb
98
- - examples/rails3_root/app/views/welcome/confirm.html.erb
99
- - examples/rails3_root/app/views/welcome/index.html.erb
100
- - examples/rails3_root/app/views/welcome/newsletter.html.erb
101
- - examples/rails3_root/app/views/welcome/signup.html.erb
102
- - examples/rails3_root/attachments/document.pdf
103
- - examples/rails3_root/attachments/image.png
104
- - examples/rails3_root/config/application.rb
105
- - examples/rails3_root/config/boot.rb
106
- - examples/rails3_root/config/cucumber.yml
107
- - examples/rails3_root/config/database.yml
108
- - examples/rails3_root/config/environment.rb
109
- - examples/rails3_root/config/environments/development.rb
110
- - examples/rails3_root/config/environments/production.rb
111
- - examples/rails3_root/config/environments/test.rb
112
- - examples/rails3_root/config/initializers/backtrace_silencers.rb
113
- - examples/rails3_root/config/initializers/cookie_verification_secret.rb
114
- - examples/rails3_root/config/initializers/delayed_job.rb
115
- - examples/rails3_root/config/initializers/inflections.rb
116
- - examples/rails3_root/config/initializers/mime_types.rb
117
- - examples/rails3_root/config/initializers/notifier_job.rb
118
- - examples/rails3_root/config/initializers/rspec_generator.rb
119
- - examples/rails3_root/config/initializers/session_store.rb
120
- - examples/rails3_root/config/locales/en.yml
121
- - examples/rails3_root/config/routes.rb
122
- - examples/rails3_root/config.ru
123
- - examples/rails3_root/db/migrate/20090125013728_create_users.rb
124
- - examples/rails3_root/db/migrate/20090908054656_create_delayed_jobs.rb
125
- - examples/rails3_root/db/schema.rb
126
- - examples/rails3_root/db/seeds.rb
127
- - examples/rails3_root/doc/README_FOR_APP
128
- - examples/rails3_root/features/attachments.feature
129
- - examples/rails3_root/features/delayed_job.feature
130
- - examples/rails3_root/features/errors.feature
131
- - examples/rails3_root/features/example.feature
132
- - examples/rails3_root/features/step_definitions/user_steps.rb
133
- - examples/rails3_root/features/step_definitions/web_steps.rb
134
- - examples/rails3_root/features/support/env.rb
135
- - examples/rails3_root/features/support/env_ext.rb
136
- - examples/rails3_root/features/support/paths.rb
137
- - examples/rails3_root/Gemfile
138
- - examples/rails3_root/Gemfile.lock
139
- - examples/rails3_root/lib/notifier_job.rb
140
- - examples/rails3_root/lib/tasks/cucumber.rake
141
- - examples/rails3_root/lib/tasks/rspec.rake
142
- - examples/rails3_root/public/404.html
143
- - examples/rails3_root/public/422.html
144
- - examples/rails3_root/public/500.html
145
- - examples/rails3_root/public/favicon.ico
146
- - examples/rails3_root/public/images/rails.png
147
- - examples/rails3_root/public/javascripts/application.js
148
- - examples/rails3_root/public/javascripts/controls.js
149
- - examples/rails3_root/public/javascripts/dragdrop.js
150
- - examples/rails3_root/public/javascripts/effects.js
151
- - examples/rails3_root/public/javascripts/prototype.js
152
- - examples/rails3_root/public/javascripts/rails.js
153
- - examples/rails3_root/public/robots.txt
154
- - examples/rails3_root/Rakefile
155
- - examples/rails3_root/README
156
- - examples/rails3_root/script/cucumber
157
- - examples/rails3_root/script/rails
158
- - examples/rails3_root/spec/controllers/welcome_controller_spec.rb
159
- - examples/rails3_root/spec/models/user_mailer_spec.rb
160
- - examples/rails3_root/spec/spec_helper.rb
161
- - examples/sinatra_root/config.ru
162
- - examples/sinatra_root/features/errors.feature
163
- - examples/sinatra_root/features/example.feature
164
- - examples/sinatra_root/features/step_definitions/user_steps.rb
165
- - examples/sinatra_root/features/step_definitions/web_steps.rb
166
- - examples/sinatra_root/features/support/env.rb
167
- - examples/sinatra_root/features/support/paths.rb
168
- - examples/sinatra_root/lib/example_sinatra_app.rb
169
- has_rdoc: true
170
317
  homepage: http://github.com/bmabey/email-spec/
171
318
  licenses: []
172
-
173
319
  post_install_message:
174
- rdoc_options:
175
- - --charset=UTF-8
176
- require_paths:
320
+ rdoc_options: []
321
+ require_paths:
177
322
  - lib
178
- required_ruby_version: !ruby/object:Gem::Requirement
323
+ required_ruby_version: !ruby/object:Gem::Requirement
179
324
  none: false
180
- requirements:
181
- - - ">="
182
- - !ruby/object:Gem::Version
183
- hash: 3
184
- segments:
185
- - 0
186
- version: "0"
187
- required_rubygems_version: !ruby/object:Gem::Requirement
325
+ requirements:
326
+ - - ! '>='
327
+ - !ruby/object:Gem::Version
328
+ version: '0'
329
+ required_rubygems_version: !ruby/object:Gem::Requirement
188
330
  none: false
189
- requirements:
190
- - - ">="
191
- - !ruby/object:Gem::Version
192
- hash: 3
193
- segments:
194
- - 0
195
- version: "0"
331
+ requirements:
332
+ - - ! '>='
333
+ - !ruby/object:Gem::Version
334
+ version: '0'
196
335
  requirements: []
197
-
198
336
  rubyforge_project: email-spec
199
- rubygems_version: 1.3.7
337
+ rubygems_version: 1.8.23
200
338
  signing_key:
201
339
  specification_version: 3
202
340
  summary: Easily test email in rspec and cucumber
203
- test_files:
204
- - spec/email_spec/helpers_spec.rb
205
- - spec/email_spec/mail_ext_spec.rb
206
- - spec/email_spec/matchers_spec.rb
207
- - spec/spec_helper.rb
208
- - examples/rails3_root/app/controllers/application_controller.rb
209
- - examples/rails3_root/app/controllers/welcome_controller.rb
210
- - examples/rails3_root/app/helpers/application_helper.rb
211
- - examples/rails3_root/app/mailers/user_mailer.rb
212
- - examples/rails3_root/app/models/user.rb
213
- - examples/rails3_root/app/views/user_mailer/attachments.html.erb
214
- - examples/rails3_root/app/views/user_mailer/newsletter.html.erb
215
- - examples/rails3_root/app/views/user_mailer/signup.html.erb
216
- - examples/rails3_root/app/views/user_mailer/signup.text.erb
217
- - examples/rails3_root/app/views/welcome/attachments.html.erb
218
- - examples/rails3_root/app/views/welcome/confirm.html.erb
219
- - examples/rails3_root/app/views/welcome/index.html.erb
220
- - examples/rails3_root/app/views/welcome/newsletter.html.erb
221
- - examples/rails3_root/app/views/welcome/signup.html.erb
222
- - examples/rails3_root/attachments/document.pdf
223
- - examples/rails3_root/attachments/image.png
224
- - examples/rails3_root/config/application.rb
225
- - examples/rails3_root/config/boot.rb
226
- - examples/rails3_root/config/cucumber.yml
227
- - examples/rails3_root/config/database.yml
228
- - examples/rails3_root/config/environment.rb
229
- - examples/rails3_root/config/environments/development.rb
230
- - examples/rails3_root/config/environments/production.rb
231
- - examples/rails3_root/config/environments/test.rb
232
- - examples/rails3_root/config/initializers/backtrace_silencers.rb
233
- - examples/rails3_root/config/initializers/cookie_verification_secret.rb
234
- - examples/rails3_root/config/initializers/delayed_job.rb
235
- - examples/rails3_root/config/initializers/inflections.rb
236
- - examples/rails3_root/config/initializers/mime_types.rb
237
- - examples/rails3_root/config/initializers/notifier_job.rb
238
- - examples/rails3_root/config/initializers/rspec_generator.rb
239
- - examples/rails3_root/config/initializers/session_store.rb
240
- - examples/rails3_root/config/locales/en.yml
241
- - examples/rails3_root/config/routes.rb
242
- - examples/rails3_root/config.ru
243
- - examples/rails3_root/db/migrate/20090125013728_create_users.rb
244
- - examples/rails3_root/db/migrate/20090908054656_create_delayed_jobs.rb
245
- - examples/rails3_root/db/schema.rb
246
- - examples/rails3_root/db/seeds.rb
247
- - examples/rails3_root/doc/README_FOR_APP
248
- - examples/rails3_root/features/attachments.feature
249
- - examples/rails3_root/features/delayed_job.feature
250
- - examples/rails3_root/features/errors.feature
251
- - examples/rails3_root/features/example.feature
252
- - examples/rails3_root/features/step_definitions/user_steps.rb
253
- - examples/rails3_root/features/step_definitions/web_steps.rb
254
- - examples/rails3_root/features/support/env.rb
255
- - examples/rails3_root/features/support/env_ext.rb
256
- - examples/rails3_root/features/support/paths.rb
257
- - examples/rails3_root/Gemfile
258
- - examples/rails3_root/Gemfile.lock
259
- - examples/rails3_root/lib/notifier_job.rb
260
- - examples/rails3_root/lib/tasks/cucumber.rake
261
- - examples/rails3_root/lib/tasks/rspec.rake
262
- - examples/rails3_root/public/404.html
263
- - examples/rails3_root/public/422.html
264
- - examples/rails3_root/public/500.html
265
- - examples/rails3_root/public/favicon.ico
266
- - examples/rails3_root/public/images/rails.png
267
- - examples/rails3_root/public/javascripts/application.js
268
- - examples/rails3_root/public/javascripts/controls.js
269
- - examples/rails3_root/public/javascripts/dragdrop.js
270
- - examples/rails3_root/public/javascripts/effects.js
271
- - examples/rails3_root/public/javascripts/prototype.js
272
- - examples/rails3_root/public/javascripts/rails.js
273
- - examples/rails3_root/public/robots.txt
274
- - examples/rails3_root/Rakefile
275
- - examples/rails3_root/README
276
- - examples/rails3_root/script/cucumber
277
- - examples/rails3_root/script/rails
278
- - examples/rails3_root/spec/controllers/welcome_controller_spec.rb
279
- - examples/rails3_root/spec/models/user_mailer_spec.rb
280
- - examples/rails3_root/spec/spec_helper.rb
281
- - examples/sinatra_root/config.ru
282
- - examples/sinatra_root/features/errors.feature
283
- - examples/sinatra_root/features/example.feature
284
- - examples/sinatra_root/features/step_definitions/user_steps.rb
285
- - examples/sinatra_root/features/step_definitions/web_steps.rb
286
- - examples/sinatra_root/features/support/env.rb
287
- - examples/sinatra_root/features/support/paths.rb
288
- - examples/sinatra_root/lib/example_sinatra_app.rb
341
+ test_files: []
342
+ has_rdoc: