Skip to content

Commit

Permalink
Merge pull request #31 from pivotaldayjam/find_xpath
Browse files Browse the repository at this point in the history
Adds the #find_xpath alias to Capybara::Email::Node
  • Loading branch information
bcardarella committed Dec 2, 2013
2 parents 7147391 + 9b25e32 commit 2c48321
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/capybara/email/node.rb
Expand Up @@ -34,6 +34,7 @@ def visible?
def find(locator)
native.xpath(locator).map { |node| self.class.new(driver, node) }
end
alias :find_xpath :find

protected

Expand Down
6 changes: 6 additions & 0 deletions spec/email/driver_spec.rb
Expand Up @@ -99,6 +99,12 @@ def self.call(env)
all_emails.should be_empty
end

scenario 'email content matchers' do
email = deliver(multipart_email)
open_email('test@example.com')
current_email.should have_link('another example', :href => 'http://example.com:1234')
end

scenario 'via ActionMailer' do
email = deliver(plain_email)

Expand Down

0 comments on commit 2c48321

Please sign in to comment.