capybara-email 3.0.1
“Test your ActionMailer and Mailer messages in Capybara”
Markdown references a remote imageRuby creates a directory tree
SHA-256031900df5b2397c0f873c0308419d85eecb9e6d9661dc72a58518b86aedf4ccd
MaleculeH₂(Db₂F)
Evidence
4:91… is)](https://gemnasium.com/DavyJonesLocker/capybara-email.svg)
5[](https://codeclimate.com/github/dockyard/capybara-email)
6
7Easily test [ActionMailer](https://github.com/rails/rails/tree/master/actionmailer) and [Mail](https://github.com/mikel/mail) messages in your Capybara integration tests
⋯12 lines
⋯17 lines
18 end
19
20 # Nokogiri object for traversing content
21 #
22 # @return Nokogiri::HTML::Document
⋯11 lines
34 end
35
36 alias_method :find_xpath, :find
37
38 def find_css(selector)
⋯10 lines
1class Capybara::Node::Email < Capybara::Node::Document
2
3 # Delegate to the email body
4 #
5 # @return [Mail::Message#body]
6 def body
7 base.raw
8 end
9
10 # Treat the message's body as a Capybara::Node::Simple so that
11 # selectors actually work instead of raising NotImplementedErrors
12 def body_as_simple_node
⋯30 lines
43 path = File.expand_path(path, Capybara.save_path) if Capybara.save_path
44
45 FileUtils.mkdir_p(File.dirname(path))
46
47 File.open(path,'w') { |f| f.write(body) }
48 path
No evidence locations were recorded for this file. Raw result