
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Ruby tests that read like documentation.
A modern test framework for Ruby that uses comments to define expectations. Tryouts are meant to double as documentation, so the Ruby code should be plain and reminiscent of real code.
[!NOTE] Agent-Optimized Output: Tryouts includes specialized output modes for LLM consumption with
--agent
flag, providing structured, token-efficient test results that are 60-80% smaller than traditional output while preserving debugging context.
[!WARNING] Version 3.0+ uses Ruby's Prism parser and pattern matching, requiring Ruby 3.2+
#=>
)#==>
for true, #=/=>
for false, #=:>
for class/module)# Add to your Gemfile:
gem 'tryouts'
# Or install directly:
$ gem install tryouts
# Auto-discover and run all tests
try
# Run specific test file
try try/core/basic_syntax_try.rb
Tryouts use a comment-based syntax for expecations:
# Setup code runs before all tests
puts 'Setup running'
## Simple test with expectation
a = 1 + 1
#=> 2
## Multi-line test with description
## TEST: Addition works correctly
a = 1
b = 2
a + b
#=> 3
## Testing object methods
'hello'.upcase
#=> 'HELLO'
## Expressions are evaluated
81
#=> 9 * 9
## Testing errors with rescue
begin
raise RuntimeError, "test error"
rescue RuntimeError
:caught
end
#=> :caught
# Teardown runs after all tests
puts 'Cleanup complete'
Each test file is made up of three sections:
##
), Ruby code, and expectations (#=>
)Syntax | Description | Example | Context |
---|---|---|---|
#=> | Traditional value equality | #=> [1, 2, 3] | result, _ |
#==> | Must be exactly true | #==> result.include?(2) | result, _ |
#=/=> | Must be exactly false | #=/=> _.empty? | result, _ |
#=|> | Must be true OR false | #=|> 0.positive? | result, _ |
#=!> | Must raise an exception | #=!> error.is_a?(ZeroDivisionError) | error |
#=:> | Must match result type | #=:> String | result, _ |
#=~> | Must match regex pattern | #=~> /^[^@]+@[^@]+\.[^@]+$/ | result, _ |
#=%> | Must complete within time | #=%> 2000 # in milliseconds | result, _ |
#=1> | Match content in STDOUT | #=1> "You have great success" | result, _ |
#=2> | Match content in STDERR | #=2> /[a-zA-Z0-9]+-?[0-9]{1,5} | result, _ |
#=<> | Fails on purpose | #==<> result.include?(4) | result, _ |
Version 3 introduces framework translators that convert tryouts into the equivalent tests in popular test tools, like RSpec and Minitest.
# Framework integration
try --rspec try/core/basic_syntax_try.rb # Run with RSpec
try --minitest try/core/basic_syntax_try.rb # Run with Minitest
# Code generation only
try --generate-rspec try/core/basic_syntax_try.rb > spec/basic_syntax_spec.rb
try --generate-minitest try/core/basic_syntax_try.rb > test/basic_syntax_test.rb
# Output options
try -v # verbose (includes source code and return values)
try -q # quiet mode
try -f # show failures only
try -D # debug mode
# Agent-optimized output for LLMs
try --agent # structured, token-efficient output
try --agent --agent-focus summary # show only counts and problem files
try --agent --agent-focus first-failure # show first failure per file
try --agent --agent-focus critical # show only errors/exceptions
try --agent --agent-limit 1000 # limit output to 1000 tokens
I mean, you could. If that already works well, you could probably still benefit from an agent that is able to focus on the critical information for the task. And the extra context window space.
Raw test output creates problems when working with AI assistants: high token usage with inconsistent parsing across different runs, where the same logical failure might be interpreted differently, making it difficult to reliably produce and analyze results consistently.
Tryouts' --agent
mode inspired the development of TOPAZ (Test Output Protocol for AI Zealots) - a standardized format optimized for AI analysis. The tpane tool implements this protocol, transforming any test framework's output into structured, token-efficient formats.
Instead of overwhelming AI with raw output, TOPAZ provides clean semantic data focusing on what actually needs attention - failures, errors, and actionable context.
0
: All tests pass1+
: Number of failing testsData.define
classes for test representationFor real-world usage examples, see:
This version of Tryouts was developed with assistance from AI tools. The following tools provided significant help with architecture design, code generation, and documentation:
I remain responsible for all design decisions and the final code. I believe in being transparent about development tools, especially as AI becomes more integrated into our workflows as developers.
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.