
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
:exclamation: Guard::Minitest is a better alternative to Guard::Test, you should definitely check it out: https://github.com/guard/guard-minitest. :exclamation:
Guard::Test allows to automatically & intelligently launch tests when you create or modify files.
Please be sure to have Guard installed before continuing.
Add the gem to your Gemfile (inside the :development
or :tool
group):
group :development do
gem 'guard-test'
end
Add guard definition to your Guardfile by running this command:
$ guard init test
Ruby on Rails lazy loads gems as needed in its test suite. As a result Guard::Test may not be able to run all tests until the gem dependencies are resolved.
To solve the issue either add the missing dependencies or remove the tests.
Example:
Specify ruby-prof as application's dependency in Gemfile to run benchmarks.
Rails automatically generates a performance test stub in the test/performance
directory which can trigger this error.
Either add ruby-prof
to your Gemfile
(inside the test
group):
group :test do
gem 'ruby-prof'
end
Or remove the test if it isn't necessary.
Please read the Guard usage doc.
By default, Guard::Test watch for files matching test_*.rb
or *_test{s,}.rb
in the test
directory (you can change this directory with the test_paths
option, see below).
See the template Guardfile for some examples.
Please read the Guard documentation for more info about the Guardfile DSL.
Deprecation notice: The :runner
option is deprecated. If you had set it to "fastfail", it is now the default in test-unit 2, but if you want the opposite, you can pass the cli: '--no-show-detail-immediately'
option instead.
bundler: false # Whether or not to use `bundle exec` to run tests, default: true (if a you have a Gemfile in the current directory)
rubygems: true # Whether or not to require rubygems (if bundler isn't used) when running the tests, default: false
rvm: ['1.9.3', 'jruby'] # Directly run your specs against multiple Rubies, default: nil
spring: true # Run your tests with [`spring`](https://github.com/jonleighton/spring), default: false
zeus: true # Run your tests with [`zeus`](https://github.com/burke/zeus), default: false
drb: true # Run your tests with [`spork-testunit`](https://github.com/timcharper/spork-testunit), default: false
include: ['foo', 'bar'] # Pass arbitrary include paths to the command that runs the tests, default: ['test']
cli: 'color' # Pass arbitrary CLI arguments to the command that runs the tests, default: nil
all_on_start: false # Run all tests on Guard startup, default: true.
all_after_pass: false # Run all tests after the current run tests pass, default: true
keep_failed: false # Re-run failing tests until they pass, default: true
test_paths: ['spec'] # Array of paths that where are located the test files, default: ['test']
spring
optionImportant: The spring testunit
command of official version 0.0.8 of spring is running only file specified as first argument, other are ignored. Fortunately this issue has been fixed recently in spring master and all test files given in arguments are invoked, see #102. However that has not been packaged yet, therefore while waiting for spring 0.0.9 release we recommend to use (in your Gemfile):
gem 'spring', github: 'jonleighton/spring'
zeus
optionWhen true, the include
option is disregarded, as it does not work with zeus
' test runner.
The zeus server process (zeus start
) must already be running in another terminal (you can use guard-zeus for that).
drb
optionWhen true, notifications are disabled. This might be fixed in future releases.
Pull requests are very welcome! Please try to follow these simple rules if applicable:
For questions please join us in our Google group or on
#guard
(irc.freenode.net).
FAQs
Unknown package
We found that guard-test 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
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.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.