
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.
Mock js objects with capybara
Add this line to your application's Gemfile:
gem 'capyspy', group: :test
And then execute:
$ bundle
Or install it yourself as:
$ gem install capyspy
describe 'Details page', js: true do
it 'should share article' do
spy = spy_on 'share'
page.evaluate_script 'share()'
expect(spy).to have_been_called
expect('share').to have_been_called
expect(spy.calls).to have(1).item
end
it 'should delete article after confirm' do
spy = spy_on('confirm').and_return true
click_button 'Delete'
expect(spy).to have_been_called
end
it 'should publish article' do
spy = spy_on('alert').and_call_through
click_button 'Publish'
expect(spy).to have_been_called
expect(spy.calls.last).to include 'You item was published'
end
it 'should share via facebook' do
spy = spy_on('fbShare').and_call_fake 'function (id) { shareToFb(id); }'
click_button 'Share via FB'
expect(spy).to have_been_called
end
end
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that capyspy 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
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.