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 collaboratorRunning an interactive command
In order to test interactive command line applications
As a developer using Cucumber
I want to use the interactive session steps
- Background
-
- Given
- I use a fixture named "cli-app"
- Scenarios
-
- Running ruby interactively
- Running a native binary interactively
- Pipe in a file
- Close stdin stream
- All processes are stopped before checking for filesystem changes
- Running ruby interactively
-
- Given
-
an executable named "bin/cli" with:
#!/usr/bin/env ruby while res = gets.chomp break if res == "quit" puts res.reverse end
- And
-
a file named "features/interactive.feature" with:
Feature: Run command Scenario: Run command When I run
cli
interactively And I type "hello, world" And I type "quit" Then it should pass with "dlrow ,olleh" - When
-
I run
cucumber
- Then
- the features should all pass
- Running a native binary interactively
-
- Given
-
a file named "features/interactive.feature" with:
Feature: Run command Scenario: Run command When I run
cat
interactively And I type "Hello, world" And I type "" Then the output should contain "Hello, world" - When
-
I run
cucumber
- Then
- the features should all pass
- Pipe in a file
-
- Given
-
a file named "features/interactive.feature" with:
Feature: Run command Scenario: Run command Given a file named "test.txt" with "line1\nline2" When I run
cat
interactively And I pipe in the file "test.txt" Then the output should contain "line1\nline2" - When
-
I run
cucumber
- Then
- the features should all pass
- Close stdin stream
-
- Given
-
a file named "features/interactive.feature" with:
Feature: Run command Scenario: Run command When I run
cat
interactively And I type "Hello, world" And I close the stdin stream Then the output should contain "Hello, world" - When
-
I run
cucumber
- Then
- the features should all pass
- All processes are stopped before checking for filesystem changes
-
See: http://github.com/aslakhellesoy/aruba/issues#issue/17 for context
- Given
-
a file named "features/interactive.feature" with:
Feature: Run command Scenario: Run command Given a directory named "rename_me" When I run
mv rename_me renamed
interactively Then the directory "renamed" should exist And the directory "rename_me" should not exist - When
-
I run
cucumber
- Then
- the features should all pass
Last published about 7 years ago by Max Meyer.