
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Provides a generic factory to automatically convert the RSpec matchers of your favorite gems into assertions and expectations for MiniTest::Unit and MiniTest::Spec. It is a generalization of Jared Ning's capybara_minitest_spec.
# Gemfile
gem 'rspec2minitest'
To create assertions / expectations from all Capybara RSpec matchers add to your test_helper
:
require 'rspec2minitest/capybara'
For the have_text
matcher you can then use:
# Unit
assert_page_has_text(page, text)
refute_page_has_text(page, text)
# Spec
it { must_have_text(text) }
it { wont_have_text(text) }
For all matchers see Capybara/RSpecMatchers
This is exactly what the capybara_minitest_spec
gem does. If Capybara
matchers are the only ones you need to convert, I recommend using that gem.
# test_helper
require 'rspec2minitest/paperclip'
The have_attachment
matcher gets converted to assert_model_has_attachment
and must_have_attachment
and their negative counterparts.
For all matchers see Paperclip::Shoulda::Matchers
You can use the API of rspec2minitest to easily create your own integrations
within your test_helper. require 'rspec2minitest'
provides you with an
RSpec2MiniTest module that provides an add_matcher
function to convert
single matchers and an add_matchers
function to convert all public instance
methods of a given module.
Have a look at the integrations in lib/rspec2minitest
for examples and do
not forget to issue a pull request to add lib/rspec2minitest/#{gemname}.rb
to the rspec2minitest spec. :)
FAQs
Unknown package
We found that rspec2minitest demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
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.