1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix another false assertions

* The assertions in AS::Duration don't actually assert.
 * The assertion in Railtie will pass even when `eager_load_namespaces`
   doesn't include `AppTemplate::Application` if `Rails.application` is
   truthy.

For more details, see here:

 * https://github.com/rails/rails/pull/16998
 * https://github.com/rails/rails/pull/17000
This commit is contained in:
Yuki Nishijima 2014-09-21 14:36:00 -07:00
parent 3f39ac4ee8
commit f8e26c8014
2 changed files with 3 additions and 3 deletions

View file

@ -98,8 +98,8 @@ class DurationTest < ActiveSupport::TestCase
def test_since_and_ago def test_since_and_ago
t = Time.local(2000) t = Time.local(2000)
assert t + 1, 1.second.since(t) assert_equal t + 1, 1.second.since(t)
assert t - 1, 1.second.ago(t) assert_equal t - 1, 1.second.ago(t)
end end
def test_since_and_ago_without_argument def test_since_and_ago_without_argument

View file

@ -182,7 +182,7 @@ module ApplicationTests
test "application is always added to eager_load namespaces" do test "application is always added to eager_load namespaces" do
require "#{app_path}/config/application" require "#{app_path}/config/application"
assert Rails.application, Rails.application.config.eager_load_namespaces assert_includes Rails.application.config.eager_load_namespaces, AppTemplate::Application
end end
test "the application can be eager loaded even when there are no frameworks" do test "the application can be eager loaded even when there are no frameworks" do