Coder Social home page Coder Social logo

Comments (14)

metaskills avatar metaskills commented on August 19, 2024

Thanks, I will take a look at this real soon!

from minitest-spec-rails.

tubaxenor avatar tubaxenor commented on August 19, 2024

It only happens when include MiniTestSpecRails::Init::ActionViewBehavior, other inits are fine.

Now I move it after AcitveSupport loaded, but don't know if that will impact some other stuff...

from minitest-spec-rails.

metaskills avatar metaskills commented on August 19, 2024

We have a really easy testing setup. Feel up to a tested pull request?

https://github.com/metaskills/minitest-spec-rails#contributing

from minitest-spec-rails.

metaskills avatar metaskills commented on August 19, 2024

All the test pass in Ruby 2.0 with Rails 4.0.0.beta1. I also created a test project here and it ran just fine. Can you help me find out what your issue is and how to reproduce it?

from minitest-spec-rails.

tubaxenor avatar tubaxenor commented on August 19, 2024

Let me clone it and try if I can reproduce the error

from minitest-spec-rails.

tubaxenor avatar tubaxenor commented on August 19, 2024

sorry, wrong click...
I can't reproduce it, and even on my project it works today...
I will reopen it if I find more details

from minitest-spec-rails.

metaskills avatar metaskills commented on August 19, 2024

OK, thanks!

from minitest-spec-rails.

tubaxenor avatar tubaxenor commented on August 19, 2024

I fixed my issue by bundle update, guess there are some dependency issues resolved in some other gems.

here are my diffs from my Gemfile.lock before/after bundle update in case of someone having the same issue:

21c21
<     brakeman (1.9.2)
---
>     brakeman (1.9.3)
98c98
<     childprocess (0.3.8)
---
>     childprocess (0.3.9)
111c111
<     eventmachine (1.0.0)
---
>     eventmachine (1.0.1)
122c122
<     i18n (0.6.2)
---
>     i18n (0.6.4)
142c142
<     minitest (4.6.1)
---
>     minitest (4.6.2)
152c152
<     net-ssh (2.6.5)
---
>     net-ssh (2.6.6)
164c164
<     pry-editline (1.1.1)
---
>     pry-editline (1.1.2)
172c172
<     rack-protection (1.3.2)
---
>     rack-protection (1.4.0)
201c201
<     redis (3.0.2)
---
>     redis (3.0.3)
214c214
<     selenium-webdriver (2.30.0)
---
>     selenium-webdriver (2.31.0)
220c220
<     sidekiq (2.7.5)
---
>     sidekiq (2.8.0)
257c257
<     tilt (1.3.3)
---
>     tilt (1.3.4)
271c271
<     tzinfo (0.3.35)
---
>     tzinfo (0.3.36)

from minitest-spec-rails.

metaskills avatar metaskills commented on August 19, 2024

Thanks, but nothing there stands out. GWNK :)

from minitest-spec-rails.

mattruzicka avatar mattruzicka commented on August 19, 2024

I'm also using rails 4.0.0-beta1 and ruby 2.0.0 and was hitting the same error. Bundle update wasn't doing the trick for me. However, the test do run when I comment out the following code in my setup_email.rb initializer.

ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:user_name => ***,
:password => ***
,
:authentication => "plain",
:enable_starttls_auto => true
}

From googling around, I had a feeling it had something to do with ActionMailer, but I'm not really sure what's going on. Perhaps something here has been removed in rails 4? Nevertheless, my email settings/application emails seem to be working.

from minitest-spec-rails.

 avatar commented on August 19, 2024

I'm having the same issue. I commented out my ActionMailer settings as @mattruzicka suggested and that did the trick. I'll see if I can come up with a sample app to repro the error.

from minitest-spec-rails.

 avatar commented on August 19, 2024

I've created a sample app that recreates this error. Steps to reproduce are included in the README.

https://github.com/dpbus/minitest-spec-rails-issue16-repro

from minitest-spec-rails.

metaskills avatar metaskills commented on August 19, 2024

This is very very odd, form what I can tell, even tho ActionController::Rendering is included from the list of ActionController::Base::MODULES, it seems the included hook and definition of class_attribute :protected_instance_variables is not being called yet. This could be considered a bug of Rails, however, I have a feeling that they may tell you your initializer is doing it wrong.

Rather than loading up ActionMailer::Base in the initializer by configuring it that way, perhaps your initializer should look something like this:

My::Application.configure do
  config.action_mailer.smtp_settings = { }
end

I can confirm that the sample app does not error out when doing this as well. Thoughts?

from minitest-spec-rails.

 avatar commented on August 19, 2024

Thanks for looking into this. The Rails documentation seems to be somewhat conflicted... in the guides it seems to lean towards the configure block as you showed above, but in the ActionMailer README, it still shows setting the smtp_settings on ActionMailer::Base directly.

Regardless, it sounds like you can close this again. I'll double check that using a configure block to set mailer settings fixes the problem in my real app tonight when I get a chance.

I really appreciate your help with this!

from minitest-spec-rails.

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.