Permalink
Browse files

added email_spec dependency

  • Loading branch information...
1 parent 210d527 commit e53e650e819e9767af82318c6f63ed162e432c85 @sbounmy sbounmy committed Mar 30, 2013
Showing with 8 additions and 3 deletions.
  1. +7 −3 spec/mailers/order_mailer_spec.rb
  2. +1 −0 spree_multi_lingual.gemspec
@@ -1,13 +1,17 @@
require 'spec_helper'
-
+require 'email_spec'
module Spree
+
describe OrderMailer do
+ include EmailSpec::Helpers
+ include EmailSpec::Matchers
+
let(:order) { FactoryGirl.create(:order, :locale => :fr) }
let(:mail) { ActionMailer::Base.deliveries.last }
it "should use i18n email template" do
- OrderMailer.confirm_email(order, true).deliver
- mail.encoded.should include("Merci")
+ mail = OrderMailer.confirm_email(order, true)
+ mail.body.should include("Merci")
end
end
end
@@ -34,6 +34,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'launchy', '2.0.5'
s.add_development_dependency 'awesome_print'
s.add_development_dependency 'deface', '~> 1.0.0.rc2'
+ s.add_development_dependency 'email_spec', '~> 1.2.1'
# Seems Spree doesn't require it correctly or there is a problem with extensions maybe? Still, it is needed to work with the dummy app!
s.add_development_dependency 'sass-rails'
end

0 comments on commit e53e650

Please sign in to comment.