Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Test you ActionMailer emails with Capybara
Ruby
Branch: vim_swp_files
Pull request Compare This branch is 131 commits behind dockyard:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
.rspec
Gemfile
LICENSE
README.md
Rakefile
capybara-email.gemspec

README.md

CapybaraEmail

Easily test your ActionMailer emails in your Capybara integration tests.

Installation

Add this line to your application's Gemfile:

gem 'capybara-email'

And then execute:

$ bundle

Or install it yourself as:

$ gem install capybara-email

Usage

# rspec example

feature 'Emailer' do
  background do
    # will clear the ActionMailer queue
    clear_emails
    visit email_trigger_path
    # Will find an email sent to test@example.com
    # and set the `current_email` helper
    open_email('test@example.com')
  end

  scenario 'following a link' do
    current_email.click_link 'your profile'
    page.should have_content 'Profile page'
  end

  scenario 'testing for content' do
    current_email.should have_content 'Hello Joe!'
  end
end

Authors

Brian Cardarella

Versioning

This gem follows Semantic Versioning

Want to help?

Stable branches are created based upon each minor version. Please make pull requests to specific branches rather than master.

Please make sure you include tests!

Unless Rails drops support for Ruby 1.8.7 we will continue to use the hash-rocket syntax. Please respect this.

Don't use tabs to indent, two spaces are the standard.

Legal

DockYard, LLC © 2012

@dockyard

Licensed under the MIT license

Something went wrong with that request. Please try again.