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:
parent
3f39ac4ee8
commit
f8e26c8014
2 changed files with 3 additions and 3 deletions
|
@ -98,8 +98,8 @@ class DurationTest < ActiveSupport::TestCase
|
|||
|
||||
def test_since_and_ago
|
||||
t = Time.local(2000)
|
||||
assert t + 1, 1.second.since(t)
|
||||
assert t - 1, 1.second.ago(t)
|
||||
assert_equal t + 1, 1.second.since(t)
|
||||
assert_equal t - 1, 1.second.ago(t)
|
||||
end
|
||||
|
||||
def test_since_and_ago_without_argument
|
||||
|
|
|
@ -182,7 +182,7 @@ module ApplicationTests
|
|||
|
||||
test "application is always added to eager_load namespaces" do
|
||||
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
|
||||
|
||||
test "the application can be eager loaded even when there are no frameworks" do
|
||||
|
|
Loading…
Reference in a new issue