Class: Capybara::Node::Email

Inherits:
Document
  • Object
show all
Defined in:
lib/capybara/node/email.rb

Instance Method Summary collapse

Instance Method Details

#bodyMail::Message#body

Delegate to the email body

Returns:

  • (Mail::Message#body)


6
7
8
# File 'lib/capybara/node/email.rb', line 6

def body
  base.raw
end

#fromMail::Message#from

Delegate to the email from

Returns:

  • (Mail::Message#from)


27
28
29
# File 'lib/capybara/node/email.rb', line 27

def from
  base.from
end

#save_and_openObject

Will open the email body in your browser



32
33
34
35
# File 'lib/capybara/node/email.rb', line 32

def save_and_open
  require 'capybara/util/save_and_open_page'
  ::Capybara.save_and_open_page(body)
end

#subjectMail::Message#subject

Delegate to the email subject

Returns:



13
14
15
# File 'lib/capybara/node/email.rb', line 13

def subject
  base.subject
end

#toMail::Message#to

Delegate to the email to

Returns:

  • (Mail::Message#to)


20
21
22
# File 'lib/capybara/node/email.rb', line 20

def to
  base.to
end