Systematize core extesions

This commit is contained in:
cryptogopher 2024-12-07 16:05:07 +01:00
parent d31ff5442a
commit 25ac126df9
4 changed files with 8 additions and 7 deletions

View File

@ -1 +1,5 @@
require 'core_ext/big_decimal/formatting' require 'core_ext/big_decimal_scientific_notation'
ActiveSupport.on_load :action_dispatch_system_test_case do
prepend CoreExt::ActionDispatch::SystemTesting::TestHelpers::ScreenshotHelperUniqueId
end

View File

@ -1,3 +0,0 @@
ActiveSupport.on_load :action_dispatch_system_test_case do
prepend CoreExt::ActionDispatch::SystemTesting::TestHelpers::CustomScreenshotHelperUniqueId
end

View File

@ -1,4 +1,4 @@
module CoreExt::ActionDispatch::SystemTesting::TestHelpers::CustomScreenshotHelperUniqueId module CoreExt::ActionDispatch::SystemTesting::TestHelpers::ScreenshotHelperUniqueId
private private
def unique def unique

View File

@ -1,4 +1,4 @@
module FixinMe module CoreExt
module BigDecimalScientificNotation module BigDecimalScientificNotation
def to_scientific def to_scientific
return 'NaN' unless finite? return 'NaN' unless finite?
@ -33,4 +33,4 @@ module FixinMe
end end
end end
BigDecimal.prepend(FixinMe::BigDecimalScientificNotation) BigDecimal.prepend CoreExt::BigDecimalScientificNotation