Sus is a testing framework for Ruby.
expect style syntax with first-class predicates.sus-fixtures- gems for examples).Please see the project documentation for more details.
Getting Started - This guide explains how to use the sus gem to write tests for your Ruby projects.
Mocking - This guide explains how to use mocking in sus to isolate dependencies and verify interactions in your tests.
Shared Test Behaviors and Fixtures - This guide explains how to use shared test contexts and fixtures in sus to reduce duplication and ensure consistent test behavior across your test suite.
Please see the project releases for all releases.
Sus::Fixtures::IsolatedRubyContext#isolated_ruby for evaluating Ruby in a fresh process with optional working directory and environment overrides, returning Ruby values and re-raising exceptions in the caller.Sus::Fixtures::TemporaryDirectoryContext ignore temporary directory cleanup failures.Sus::Mock#wrap to forward blocks to the original method, and fixed receive(...).with_block(...) to use the supplied predicate.SUS_OUTPUT_VARIABLE_TRUNCATION_LIMIT environment variable to change the limit, or 0 to disable truncation.XTerm output for GitHub Actions, as it supports ANSI escape codes.Sus::Fixtures::TemporaryDirectoryContext.expect(...).to receive(...) to accept one or more calls (at least once).agent-context gem.receive now supports blocks and and_raise.Sus::Config now has a prepare_warnings! hook which enables deprecated warnings by default. This is generally considered good behaviour for a test framework.We welcome contributions to this project.
git checkout -b my-new-feature).git commit -am 'Add some feature').git push origin my-new-feature).To run the test suite:
bundle exec sus
To make a new release:
bundle exec bake gem:release:patch # or minor or major
In order to protect users of this project, we require all contributors to comply with the Developer Certificate of Origin. This ensures that all contributions are properly licensed and attributed.
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
1,223 followers · starred Nov 2022
364 followers · starred Feb 2022
31 followers · starred Nov 2024
234 followers · starred Aug 2022
Sus is a testing framework for Ruby.
expect style syntax with first-class predicates.sus-fixtures- gems for examples).Please see the project documentation for more details.
Getting Started - This guide explains how to use the sus gem to write tests for your Ruby projects.
Mocking - This guide explains how to use mocking in sus to isolate dependencies and verify interactions in your tests.
Shared Test Behaviors and Fixtures - This guide explains how to use shared test contexts and fixtures in sus to reduce duplication and ensure consistent test behavior across your test suite.
Please see the project releases for all releases.
Sus::Fixtures::IsolatedRubyContext#isolated_ruby for evaluating Ruby in a fresh process with optional working directory and environment overrides, returning Ruby values and re-raising exceptions in the caller.Sus::Fixtures::TemporaryDirectoryContext ignore temporary directory cleanup failures.Sus::Mock#wrap to forward blocks to the original method, and fixed receive(...).with_block(...) to use the supplied predicate.SUS_OUTPUT_VARIABLE_TRUNCATION_LIMIT environment variable to change the limit, or 0 to disable truncation.XTerm output for GitHub Actions, as it supports ANSI escape codes.Sus::Fixtures::TemporaryDirectoryContext.expect(...).to receive(...) to accept one or more calls (at least once).agent-context gem.receive now supports blocks and and_raise.Sus::Config now has a prepare_warnings! hook which enables deprecated warnings by default. This is generally considered good behaviour for a test framework.We welcome contributions to this project.
git checkout -b my-new-feature).git commit -am 'Add some feature').git push origin my-new-feature).To run the test suite:
bundle exec sus
To make a new release:
bundle exec bake gem:release:patch # or minor or major
In order to protect users of this project, we require all contributors to comply with the Developer Certificate of Origin. This ensures that all contributions are properly licensed and attributed.
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
1,223 followers · starred Nov 2022
364 followers · starred Feb 2022
31 followers · starred Nov 2024
234 followers · starred Aug 2022