https://github.com/gsamokovarov/mock_last_status
Mocks the $? global variable in Ruby.
https://github.com/gsamokovarov/mock_last_status
c-extension ruby test
Last synced: about 1 year ago
JSON representation
Mocks the $? global variable in Ruby.
- Host: GitHub
- URL: https://github.com/gsamokovarov/mock_last_status
- Owner: gsamokovarov
- License: mit
- Created: 2016-04-05T22:16:27.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-05T22:21:31.000Z (over 10 years ago)
- Last Synced: 2025-06-16T05:53:25.685Z (about 1 year ago)
- Topics: c-extension, ruby, test
- Language: Ruby
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Mock Last Status
For that time when you need to test `$?`. Wait, what?
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'mock_last_status'
```
And then execute:
$ bundle
## Usage
```ruby
MockLastStatus.set(123)
$?.exitstatus # => 123
```
## Contributing
Bug reports and pull requests are welcome on GitHub at
https://github.com/gsamokovarov/mock_last_status. This project is intended to
be a safe, welcoming space for collaboration, and contributors are expected to
adhere to the [Contributor Covenant](http://contributor-covenant.org) code of
conduct.
## License
The gem is available as open source under the terms of the [MIT
License](http://opensource.org/licenses/MIT).