cucumber-mailcatcher 0.4 → 0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94023ef25840e1e131ba469cb716f71fe0b94774
4
- data.tar.gz: e476e65013f68a5e992958118a3d0bbca744d89f
3
+ metadata.gz: d1fa7791588641edf58ea0e8406865ec55d26238
4
+ data.tar.gz: a4317311f8ceff0f21aad6c0cb7d49064e1637d0
5
5
  SHA512:
6
- metadata.gz: e077d0924582b5c601bdfc6f008aee04ced4d4103269cf9a6a62a87ac1e443d0af01353d7e870e56dbf72ee00004636e8edf83fc2c55354376972cc8fb32bf88
7
- data.tar.gz: c816daa219e544b319986f869b59f4922c0ebf28ecdc2269a82ba29023a84b3e15c0b53fd3eda7aa486f835a4950c10a01971524e46c640eab26de19d34163fb
6
+ metadata.gz: 054812999f9f3378c8263dd2b8e4a2ddbac563b81dbce2975be58eaa1ee1ff0107ae75a22b004cce2cc215ab66052ec04973acdc1cc1bd4725ff7cc1ee90f4fe
7
+ data.tar.gz: fee6c77cbe105ac6a0fb0c53236815d1e6039a11cf300508b5c8543a3a54cdeab6da685fc864b04574522583ff6ab5c5d1407963784f93745d67130e542273ec
@@ -2,6 +2,6 @@ module Cucumber
2
2
  module Mailcatcher
3
3
  NAME = "cucumber-mailcatcher"
4
4
  FOLDER = "cucumber/mailcatcher"
5
- VERSION = "0.4"
5
+ VERSION = "0.5"
6
6
  end
7
7
  end
@@ -7,13 +7,27 @@ require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumb
7
7
  require 'cucumber/mailcatcher/http_client.rb'
8
8
  require 'cucumber/mailcatcher/version.rb'
9
9
 
10
- module Cucumber
11
- module Mailcatcher
12
- def self.mailcatcher_steps
13
- t = ["#{File.dirname(File.expand_path($0))}/../lib/#{FOLDER}",
14
- "#{Gem.dir}/gems/#{NAME}-#{VERSION}/lib/#{FOLDER}"]
15
- t.each {|i| return "#{i}/mailcatcher_steps.rb" if File.readable?(i) }
16
- raise "both paths are invalid: #{t}"
17
- end
18
- end
10
+ Then /^I should receive (\d+) email from "(.*?)"$/ do |count, address|
11
+ messages = subject.get_messages_from_email address
12
+ expect(messages.length).to be count
13
+ end
14
+
15
+ Then /^I should receive (\d+) email sent to "(.*?)"$/ do |count, address|
16
+ messages = subject.get_messages_to_email address
17
+ expect(messages.length).to be count
18
+ end
19
+
20
+ Then /^I should receive (\d+) email with subject "(.*?)"$/ do |count, subject|
21
+ messages = subject.get_messages_with_subject subject
22
+ expect(messages.length).to be count
23
+ end
24
+
25
+ Then /^I should receive (\d+) email with a html body containing "(.*?)"$/ do |count, body|
26
+ messages = subject.get_messages_with_html_body body
27
+ expect(messages.length).to be count
28
+ end
29
+
30
+ Then /^I should receive (\d+) email with a plain body containing "(.*?)"$/ do |count, body|
31
+ messages = subject.get_messages_with_plain_body body
32
+ expect(messages.length).to be count
19
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-mailcatcher
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.4'
4
+ version: '0.5'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nic Jackson
@@ -59,7 +59,6 @@ extra_rdoc_files: []
59
59
  files:
60
60
  - lib/cucumber/mailcatcher.rb
61
61
  - lib/cucumber/mailcatcher/http_client.rb
62
- - lib/cucumber/mailcatcher/mailcatcher_steps.rb
63
62
  - lib/cucumber/mailcatcher/version.rb
64
63
  homepage: https://github.com/nicholasjackson/cucumber-mailcatcher
65
64
  licenses:
@@ -1,24 +0,0 @@
1
- Then(/^I should receive (\d+) email from "(.*?)"$/) do |count, address|
2
- messages = subject.get_messages_from_email address
3
- expect(messages.length).to be count
4
- end
5
-
6
- Then(/^I should receive (\d+) email sent to "(.*?)"$/) do |count, address|
7
- messages = subject.get_messages_to_email address
8
- expect(messages.length).to be count
9
- end
10
-
11
- Then(/^I should receive (\d+) email with subject "(.*?)"$/) do |count, subject|
12
- messages = subject.get_messages_with_subject subject
13
- expect(messages.length).to be count
14
- end
15
-
16
- Then(/^I should receive (\d+) email with a html body containing "(.*?)"$/) do |count, body|
17
- messages = subject.get_messages_with_html_body body
18
- expect(messages.length).to be count
19
- end
20
-
21
- Given(/^I should receive (\d+) email with a plain body containing "(.*?)"$/) do |count, body|
22
- messages = subject.get_messages_with_plain_body body
23
- expect(messages.length).to be count
24
- end