
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
require 'picard'
class DemoTest < Test::Unit::TestCase
include Picard::TestUnit
def test_simple_math
given
x = 1
y = 2
expect
x + y == 3
end
end
To start using picard you need to mix in Picard::TestUnit module into your TestUnit test case. It will add a special hook that will transform every test method in your test case. For instance, the "test_simple_math" method will be transformed into something like:
def test_simple_math
given
x = 1
y = 2
expect
assert_equal 3, (x + y), MESSAGE
end
end
Where the MESSAGE is:
You might notice a few things here:
gem 'picard'
There are some things I'm going to add in a week or two:
==
. If you are using something like x != y
in your expect
block it will just insert a regular assert
which is bad. It's going to be much smarter than this soon.In Spock it's possible to write data driven tests:
expect:
x + y == z
where:
x = [1, 10, 100]
y = [2, 20, 200]
z = [3, 30, 300]
Basically it will transform into something like:
expect:
1 + 2 == 3
10 + 20 == 30
100 + 200 == 300
Which is totally awesome! I'm going to add a similar feature to Picard soon.
FAQs
Unknown package
We found that picard 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 new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.