Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Ruby tests that read like documentation.
A simple test framework for Ruby code that uses introspection to allow defining checks in comments.
One of:
gem 'tryouts'
gem install tryouts
$ git clone git://github.com/tryouts/tryouts.git
# Run all tests accessible from the current directory (e.g. ./try, ./tryouts))
$ try
# Run a single test file
$ try try/10_utils_try.rb
# Command arguments
$ try -h
Usage: try [options]
-V, --version Display the version
-q, --quiet Run in quiet mode
-v, --verbose Run in verbose mode
-f, --fails Show only failing tryouts
-D, --debug Run in debug mode
-h, --help Display this help
When all tests pass, try exits with a 0. An exit code of 1 or more indicates the number of failing tests.
## A very simple test
1 + 1
#=> 2
## The test description can spread
## across multiple lines. The same
## is true for test definitions.
a = 'foo'
b = 'bar'
a + b
#=> 'foobar'
## A test will pass when its return
## value equals the expectation.
'foo'.class
#=> String
## The expectations are evaluated as well.
81
#=> 9 * 9
## Here's an example of testing errors
begin
raise RuntimeError
rescue RuntimeError
:success
end
#=> :success
For real world examples, see Onetimesecret tryouts.
Put the setup code at the top of the file, and cleanup code at the bottom. Like this:
# This is called before all tests
require 'gibbler'
Gibbler.digest_type = Digest::SHA256
## This is a single testcase
:anything.gibbler
#=> '8574309'
# This will be called after all tests
Gibbler.digest_type = Digest::SHA1
__
This collision was brought to you by Montreal.rb.
FAQs
Unknown package
We found that tryouts demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.