SystemExecutor
The dead simple wrapper class for the Kernel.system
calls. Useful during tests
when you want mock the system calls.
Installation
Add this line to your application's Gemfile:
gem 'system_executor'
And then execute:
$ bundle
Or install it yourself as:
$ gem install system_executor
Usage
require 'system_executor'
class Foo
def initialize(executor)
@executor = executor
end
def bar
...
@executor.run 'rm -r /tmp'
...
end
end
foo = Foo.new(SystemExecutor::Executor.new)
foo.bar
Versioning
See semver.org
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request