Comments (2)
If your project is a rails project then first:
$ cd /my/rails/project/root
$ script/generate email_spec
Then, open the file features/step_definitions/email_steps.rb in your favourite editor. At the top of the file around line 27 you will find:
module EmailHelpers def current_email_address # Replace with your a way to find your current email. e.g @current_user.email # last_email_address will return the last email address used by email spec to find an email. # Note that last_email_address will be reset after each Scenario. last_email_address || "[email protected]" end end . . .
Change the string "[email protected]" to whatever email address you need. However, this is seldom necessary if you specify the email delivery address in your steps.
If you do not have a Rails project then copy /path/to/gem/email-spec/rails_generators/email_spec/ templates/email_steps.rb
into your features/step_definitions directory first and then proceed as outlined above.
from email-spec.
@snoblenet The documentation has evolved since this issue was reported. Please let me know if it's still not clear. Thanks!
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.