Remove I18n gem-monkey-patching

This commit is contained in:
Alex Sherman 2021-01-14 19:35:49 +05:00
parent c57f058ff9
commit dda241c0dc
3 changed files with 3 additions and 6 deletions

View file

@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-18.04]
ruby: [ 2.7, 3.0 ]
ruby: [ 2.7 ]
runs-on: ${{ matrix.os }}
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
steps:
@ -100,11 +100,6 @@ jobs:
- name: Give test coverage reporter executable permissions
run: chmod +x cc-test-reporter
- uses: actions/download-artifact@v1
with:
name: coverage-2.6
path: coverage
- uses: actions/download-artifact@v1
with:
name: coverage-2.7

View file

@ -5,6 +5,7 @@ module I18n
alias_method :original_localize, :localize
def localize(object, options = {})
options.merge!({ default: '-' })
object.present? ? original_localize(object, options) : ''
end
end

View file

@ -20,6 +20,7 @@ class AdminAreaPricesTest < ApplicationSystemTestCase
fill_in 'Valid from', with: effective_date
click_on 'Create price'
assert_text 'Price has been created'
assert_text I18n.localize(effective_date)
end