cucumber-mailcatcher 0.6 → 0.7
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c240e850aa8eb52a4a64e602bf66cfffe47ee7a
|
4
|
+
data.tar.gz: 4bea9fb30c5ea2a6478b9b10d37a8227d7673ec9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8e317f6b30a61f27176fb50d7ec8a307f672cdeeb8a87fb65d07d2faeed60d45d28e46116f5db33fa2739bf17e768c58f359b030f874e0d053ce9ee18540537
|
7
|
+
data.tar.gz: 44b15742c7ced4a53ea9226b606fb03aa6ec9d4e9aae7f46f280d238b6bdb8f07242dcb18c4d48fbc6eb0dd55543ee2f4846c46c3a81ff2ad247e790470f07a6
|
data/lib/cucumber/mailcatcher.rb
CHANGED
@@ -27,8 +27,6 @@ end
|
|
27
27
|
|
28
28
|
Then /^I should receive (\d+) email with a html body containing "(.*?)"$/ do |count, body|
|
29
29
|
http = Cucumber::Mailcatcher::HttpClient.new
|
30
|
-
p $EMAIL_SERVER_PATH
|
31
|
-
http.server_url = $EMAIL_SERVER_PATH
|
32
30
|
messages = http.get_messages_with_html_body body
|
33
31
|
expect(messages.length).to be count.to_i
|
34
32
|
end
|
@@ -17,7 +17,7 @@ module Cucumber
|
|
17
17
|
|
18
18
|
def initialize
|
19
19
|
error = "Please set the Mailcatcher server url e.g. Cucumber::Mailcatcher::Api.server_url = 'http://localhost:1080'"
|
20
|
-
valid = @@server_url =~ /\A#{URI.regexp(%w(http https))}\z/
|
20
|
+
valid = @@server_url != nil && @@server_url =~ /\A#{URI.regexp(%w(http https))}\z/
|
21
21
|
|
22
22
|
raise error unless valid
|
23
23
|
end
|