Comments (4)
For the Before
block, we could add a case:
Before do
# ...
ActionMailer::Base.clear_deliveries
# ...
end
from email-spec.
The funny thing is that I bet the new :persistent is using the same lib as the :cache option (the one email-spec currently us using). Maybe not, but I think I found out about the cahe plugin via Culerity. Anyways, I didn't take too close of a look at the files but if you want to do a quick patch for it I'll merge it in assuming all the current features still pass. Otherwise I'll get to it sometime...
from email-spec.
Hmm, well Culerity's latest version seems to have :persistent ( http://github.com/langalex/culerity/blob/master/lib/culerity/persistent_delivery.rb ). It is a little buggy ( http://github.com/langalex/culerity/issues#issue/1 ), though, and I've proposed a fix ( http://gist.github.com/353664 ).
Anyway, I'm happy to do a patch, but I'm wondering which direction you want to go in. I'm not the biggest fan of setting ActionMailer::Base.delivery_method = :test
and ActionMailer::Base.perform_deliveries = true
within email_spec... seems like something that should be in RAILS_ROOT/config/environments/*.rb -- I find it unexpected and it took me a few minutes to figure out why delivery_method was :test and not :persistent as I had set it in environments/cucumber.rb. Also, I'm wondering if we should just create a custom delivery method :email_spec
that behaves like :persistent/:cache and looks something like http://gist.github.com/353664 . What do you think?
from email-spec.
Here's an example: http://github.com/agibralter/email-spec/commit/d517c6ff60a75636afb4b3bfcd7ba5307804f95a
from email-spec.
Related Issues (20)
- mail.html method useful? HOT 2
- Testing in isolation seems to fail HOT 1
- visit_in_email opens the wrong link
- Match have body text with special characters HOT 1
- Doesn't work anymore after upgrading Rails (ActionMailer::Base.deliveries is empty) HOT 3
- Email_spec causes rspec to fail (though not under Spring) HOT 5
- NameError: uninitialized constant RSpec::Expectations on current_email method
- NameError: uninitialized constant Delayed::DelayMail HOT 4
- Update to support mail gem 2.7 HOT 2
- `have_body_text` with URL now failing after upgrading `mail` gem from 2.6.6 to 2.7.0 HOT 3
- Incorrect parse of confirmation url generated by ahoy_email HOT 1
- Non compatible HTML entities encoding/decoding HOT 1
- New gem version HOT 2
- EmailSpec::CouldNotFindEmailError HOT 2
- checking for a mail in the queue with multiple properties HOT 1
- Add include_link matcher HOT 2
- I send my mail both via Pony and ActionMailer
- Getting uninitialized constant EmailSpec::Helpers HOT 5
- undefined local variable or method `reset_mailer' HOT 21
- 2.2.1 gem released but master is 2.2.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from email-spec.