
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
h1. AssertI18n
A collection of @I18n@ assertions I use in daily life.
h2. Assertions Provided:
h2. Helpers Provided:
I18n.locale
and running the block for each locale in turn.h2. Usage:
h3. assert_no_missing_translations:
class FooTest < Test::Unit::TestCase
include AssertI18n::TestHelper
def test_should_have_translations_for_the_word_foo
assert_no_missing_translations do
I18n.t(:foo)
end
end
def test_should_have_all_translations_needed_for_rendering_email
assert_no_missing_translations do
MyApp::EMailRenderer.new(:foo).render!
end
end
end
h3. assert_all_locales_have_all_translations_available_to_the_default_locale
class PredeployTest < Test::Unit::TestCase
include AssertI18n::TestHelper
def test_all_locales_have_all_translations_available_to_the_default_locale
assert_all_locales_have_all_translations_available_to_the_default_locale
end
end
h3. assert_localized_file_availability
class PredeployTest < Test::Unit::TestCase
include AssertI18n::TestHelper
def test_we_have_our_logo_in_all_locales
assert_localized_file_availability("#{Rails.root}/public/images/logo_%s.png")
end
end
h3. each_locale
class PredeployTest < Test::Unit::TestCase
include AssertI18n::TestHelper
def test_should_foo_for_all_locales
each_locale do |locale|
assert_some_foo_is_ok_in(locale)
end
end
end
h3. with_each_locale
class PredeployTest < Test::Unit::TestCase
include AssertI18n::TestHelper
def test_should_foo_for_all_locales
with_each_locale do
assert_that_something_still_works
end
end
end
FAQs
Unknown package
We found that cwninja-assert_i18n demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.