From dda241c0dca61ae9855bc8d05f1d191089d51b15 Mon Sep 17 00:00:00 2001 From: Alex Sherman Date: Thu, 14 Jan 2021 19:35:49 +0500 Subject: [PATCH] Remove I18n gem-monkey-patching --- .github/workflows/ruby.yml | 7 +------ lib/gem_monkey_patches/i18n.rb | 1 + test/system/admin_area/prices_test.rb | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 166c1c447..8880e83d4 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -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 diff --git a/lib/gem_monkey_patches/i18n.rb b/lib/gem_monkey_patches/i18n.rb index 2f7fceff7..7d0613247 100644 --- a/lib/gem_monkey_patches/i18n.rb +++ b/lib/gem_monkey_patches/i18n.rb @@ -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 diff --git a/test/system/admin_area/prices_test.rb b/test/system/admin_area/prices_test.rb index dbb91966a..f5a299c38 100644 --- a/test/system/admin_area/prices_test.rb +++ b/test/system/admin_area/prices_test.rb @@ -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