To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorbefore_cmd hooks
You can configure Aruba to run blocks of code before it runs
each command.
The command will be passed to the block.
You can hook into Aruba's lifecycle just before it runs a command and after it has run the command:
require_relative 'aruba'
Aruba.configure do |config|
config.before :command do |cmd|
puts "About to run '#{cmd}'"
end
end
- Background
-
- Given
- I use a fixture named "cli-app"
- Scenarios
-
- Run a simple command with an "after(:command)"-hook
-
- Given
-
a file named "features/support/hooks.rb" with:
require_relative 'aruba' Aruba.configure do |config| config.before :command do |cmd| puts "before the run of
#{cmd.commandline}
" end end - And
-
a file named "features/use_aruba_with_cucumber.feature" with:
Feature: Cucumber Scenario: First Run Given a file named "file.txt" with: """ Hello World """ When I successfully run
cat file.txt
Then the output should contain: """ Hello World """ - When
-
I run
cucumber
- Then
- the features should all pass
- And
-
the output should contain:
before the run of
cat file.txt
Last published almost 6 years ago by philoserf.