Tyler Warnock
2013-Jun-18 21:06 UTC
Getting rspec error: Net::SMTPServerBusy: Relay access denied
I''m trying to test registration emails (sent with devise), and I keep getting the error: Net::SMTPServerBusy: 454 4.7.1 <model_spec-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>: Relay access denied I''m running Rails 3.2.11 with Capybara, and I have (temporarily) chopped my spec_helper.rb and test.rb files down to the bare minimum, still getting the error above. spec_helper.rb: require ''rubygems'' require ''spork'' Spork.prefork do ENV["RAILS_ENV"] ||= ''test'' require File.expand_path("../../config/environment", __FILE__) require ''rspec/rails'' require ''rspec/autorun'' require ''capybara/rspec'' Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} RSpec.configure do |config| config.use_transactional_fixtures = true config.infer_base_class_for_anonymous_controllers = false endend Spork.each_run do FactoryGirl.reloadend test.rb: Upficial::Application.configure do config.whiny_nils = true config.consider_all_requests_local = true config.action_controller.perform_caching = false config.action_mailer.delivery_method = :testend The test itself is very straightforward: require ''spec_helper'' describe User do it "sends a confirmation email" do @user = FactoryGirl.create(:user, email: "model_spec-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org", username: "model_spec") @user.send_confirmation_instructions ActionMailer::Base.deliveries.last.to.should == [@user.email] endend I get the same result whether I run with guard/spork or with ''rspec spec/models/user_spec.rb''; the test always fails with Net::SMTPServerBusy: 454 4.7.1 <model_spec-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>: Relay access denied Any idea on what configurations should be changed, if any? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAHyJpAkE1RdhQMan2xmC7cu373cQDU0-nrJvoSSbs0ueS%3DMZOw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Tamara Temple
2013-Jun-22 19:16 UTC
Re: Getting rspec error: Net::SMTPServerBusy: Relay access denied
Tyler Warnock <tyler.warnock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m trying to test registration emails (sent with devise), and I keep getting the error: > > Net::SMTPServerBusy: 454 4.7.1 <model_spec-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>: Relay access denied > > I''m running Rails 3.2.11 with Capybara, and I have (temporarily) chopped my spec_helper.rb and test.rb files down to the bare minimum, still getting the > error above. > > spec_helper.rb: > > require ''rubygems'' > require ''spork'' > > Spork.prefork do > ENV["RAILS_ENV"] ||= ''test''The *ONLY* thing I can think of here is that RAILS_ENV is set to something other than test -- this might explain why test.rb isn''t getting picked up either. But I am stumped.> require File.expand_path("../../config/environment", __FILE__) > require ''rspec/rails'' > require ''rspec/autorun'' > require ''capybara/rspec'' > Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} > > RSpec.configure do |config| > config.use_transactional_fixtures = true > config.infer_base_class_for_anonymous_controllers = false > end > end > > Spork.each_run do > FactoryGirl.reload > end > > test.rb: > > Upficial::Application.configure do > config.whiny_nils = true > config.consider_all_requests_local = true > config.action_controller.perform_caching = false > config.action_mailer.delivery_method = :testAccording to the guides, this is redundant, but I think I''d still leave it in.> end > > The test itself is very straightforward: > > require ''spec_helper'' > > describe User do > it "sends a confirmation email" do > @user = FactoryGirl.create(:user, email: "model_spec-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org", username: "model_spec") > @user.send_confirmation_instructions > ActionMailer::Base.deliveries.last.to.should == [@user.email] > end > end > > I get the same result whether I run with guard/spork or with ''rspec spec/models/user_spec.rb''; the test always fails with > > Net::SMTPServerBusy: 454 4.7.1 <model_spec-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>: Relay access denied > > Any idea on what configurations should be changed, if any? > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ > CAHyJpAkE1RdhQMan2xmC7cu373cQDU0-nrJvoSSbs0ueS%3DMZOw%40mail.gmail.com. > For more options, visit https://groups.google.com/groups/opt_out. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/51c5f81d.4267320a.663e.ffffd78e%40mx.google.com. For more options, visit https://groups.google.com/groups/opt_out.