Skip to content

Commit

Permalink
Added find_css to email driver
Browse files Browse the repository at this point in the history
  • Loading branch information
kbaum authored and woahdae committed Nov 18, 2014
1 parent 9ece658 commit 17bf7b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/capybara/email/driver.rb
Expand Up @@ -35,6 +35,9 @@ def find(selector)

alias_method :find_xpath, :find

def find_css(selector)
dom.css(selector).map { |node| Capybara::Email::Node.new(self, node) }
end

# String version of email HTML source
#
Expand Down
1 change: 1 addition & 0 deletions spec/email/driver_spec.rb
Expand Up @@ -19,6 +19,7 @@ def self.call(env)
current_email.click_link 'example'
expect(page).to have_content 'Hello world!'
expect(current_email).to have_content 'This is only a html test'
expect(current_email).to have_css 'a'

expect(all_emails.first).to eq email

Expand Down

0 comments on commit 17bf7b4

Please sign in to comment.