Git Product home page Git Product logo

Comments (5)

michaelrshannon avatar michaelrshannon commented on June 16, 2024

@davidham I'm also seeing this under Rails 5 - did you have any luck solving this?

from email-spec.

davidham avatar davidham commented on June 16, 2024

@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.

sergiopantoja avatar sergiopantoja commented on June 16, 2024

@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.

davidham avatar davidham commented on June 16, 2024

@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.

caseyprovost avatar caseyprovost commented on June 16, 2024

👍 I am still getting this error with the proposed fix above in Rails 5.0.0

from email-spec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.