From a27cc41b84e59a39c0e49f1aa6c3b13f50cf41cc Mon Sep 17 00:00:00 2001 From: Dan Croak Date: Wed, 1 Jul 2009 16:44:46 -0400 Subject: [PATCH] adding user model test by default. fixing SMTP settings. --- config/environment.rb | 23 +---------------------- config/initializers/mail.rb | 2 -- test/unit/user_test.rb | 9 +++++++++ 3 files changed, 10 insertions(+), 24 deletions(-) create mode 100644 test/unit/user_test.rb diff --git a/config/environment.rb b/config/environment.rb index 13a6bdd..79a16e1 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -9,29 +9,8 @@ require File.join(File.dirname(__FILE__), 'boot') Rails::Initializer.run do |config| # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - # See Rails::Configuration for more options. - - # Skip frameworks you're not going to use. To use Rails without a database - # you must remove the Active Record framework. - # config.frameworks -= [ :active_record, :active_resource, :action_mailer ] - - # Force all environments to use the same logger level - # (by default production uses :info, the others :debug) - # config.log_level = :debug - - # Make Time.zone default to the specified zone, and make Active Record store time values - # in the database in UTC, and return them converted to the specified local zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Uncomment to use default local time. config.time_zone = 'UTC' - # Use SQL instead of Active Record's schema dumper when creating the test database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Activate observers that should always be running - # config.active_record.observers = :cacher, :garbage_collector + config.action_mailer.delivery_method = :smtp end diff --git a/config/initializers/mail.rb b/config/initializers/mail.rb index 3e3e8f9..bcb1342 100644 --- a/config/initializers/mail.rb +++ b/config/initializers/mail.rb @@ -1,5 +1,3 @@ -config.action_mailer.delivery_method = :smtp - ActionMailer::Base.smtp_settings = { :tls => true, :address => "smtp.gmail.com", diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb new file mode 100644 index 0000000..7df8550 --- /dev/null +++ b/test/unit/user_test.rb @@ -0,0 +1,9 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class UserTest < ActiveSupport::TestCase + should "be valid with factories" do + assert_valid Factory.build(:user) + assert_valid Factory.build(:email_confirmed_user) + end +end + -- libgit2 0.21.2