Skip to content

Commit

Permalink
monkey patch capybara-email to support multipart email
Browse files Browse the repository at this point in the history
  • Loading branch information
doitian committed Jan 5, 2013
1 parent d956746 commit 1c5af4a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -5,6 +5,16 @@
require 'rspec/autorun'
require 'capybara/email/rspec'

class Capybara::Email::Driver
def raw
if email.mime_type == 'multipart/alternative' && email.html_part
email.html_part.body.encoded
else
email.body.encoded
end
end
end

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
Expand Down

0 comments on commit 1c5af4a

Please sign in to comment.