Comments (5)
@davidham I'm also seeing this under Rails 5 - did you have any luck solving this?
from email-spec.
@michaelrshannon I'm afraid not, after trying many different things I had to uninstall it. I'm having a hard time with my email-related integration tests generally. I have a feature spec that is supposed to verify (among other things) that an email was sent, but the spec fails intermittently.
from email-spec.
@davidham @michaelrshannon Here's the fix. I was running into the same problem and finally traced it down.
In your rails_helper.rb
, you need to require spec_helper
after loading the environment. So change this:
require 'spec_helper'
require File.expand_path('../../config/environment', __FILE__)
to this:
require File.expand_path('../../config/environment', __FILE__)
require 'spec_helper'
It's safe to do this, and in fact this is how RSpec generates the rails_helper.rb
file by default now anyways (see rspec/rspec-rails@b913f6a for reference).
from email-spec.
@sergiopantoja This is awesome, thanks for posting this! I wanted to use email-spec and I still have it commented out in my Gemfile, but I'll definitely give this a try.
from email-spec.
👍 I am still getting this error with the proposed fix above in Rails 5.0.0
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
- 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.