Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.