Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
FreeBSD Copyright (c) 2012 Rubyworks
Homepage / Report Issue / Source Code
Spectroscope is an RSpec-style BDD framework that runs on top of the Ruby Test, the Ruby universal test harness. It supports all of RSpec's syntax, with a few exceptions.
$ gem install spectroscope
Specifications are written as block of describe
and it
definitions.
Here's RSpec classic example:
describe Order do
it "sums the prices of its line items" do
order = Order.new
order.add_entry(LineItem.new(:item => Item.new(
:price => Money.new(1.11, :USD)
)))
order.add_entry(LineItem.new(:item => Item.new(
:price => Money.new(2.22, :USD),
:quantity => 2
)))
order.total.should eq(Money.new(5.55, :USD))
end
end
Spectroscope only handle the specification structure, it does not provide an assertions system. For that use any of a number of available libraries, such Assay-RSpec or AE. You can require these in a helper script, or in Ruby Test configuration (see below).
Running specification is done with the rubytest
command line utility.
$ rubytest -Ilib -rae/should spec/*_spec.rb
To make things simpler, create a .test
configuration file.
require 'ae/should'
Test.run :default do |run|
run.files << 'spec/*_spec.rb'
end
Then simply use:
$ rubytest
Copyright (c) 2012 Rubyworks
Spectroscope is distributable according to the terms of the FreeBSD license.
See COPYING.rdoc for details.
FAQs
Unknown package
We found that spectroscope 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.