Skip to content

Commit

Permalink
update features to work with current aruba
Browse files Browse the repository at this point in the history
  • Loading branch information
josephholsten committed May 14, 2012
1 parent 8837b44 commit 868dfe8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 51 deletions.
12 changes: 6 additions & 6 deletions features/commands.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ Feature: Executing commands
I want to use Aruba steps to run commands and test output

Scenario: Check Stdout
When I run "echo 'i like cheese'"
When I run `echo 'i like cheese'`
Then the stdout from "echo 'i like cheese'" should contain "i like cheese"

Scenario: Check Stderr
When I run "some_error"
Then the stderr from "some_error" should contain "No such file or directory - some_error"
When I run `sh some_error`
Then the stderr should contain "sh: some_error: No such file or directory"

Scenario: Check Stdout for multiple lines
When I run "echo 'one\none\none\n'"
When I run `echo 'one\none\none\n'`
Then the output should contain:
"""
one
Expand All @@ -28,10 +28,10 @@ Feature: Executing commands
"""

Scenario: Check exit code
When I run "true"
When I run `true`
Then the exit status should be 0

Scenario: Check exit code
When I run "false"
When I run `false`
Then the exit status should be 1

34 changes: 17 additions & 17 deletions features/files.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Feature: Examining files

@steps
Scenario: File exists
Given the empty file "foo.file"
Given an empty file named "foo.file"
Then the file "foo.file" exists

@steps
Expand All @@ -21,18 +21,18 @@ Feature: Examining files

@steps
Scenario: Atime
Given the empty file "foo.file"
And we record the a/mtime of "foo.file"
And I run "sleep 1"
And I run "touch -a foo.file"
Given an empty file named "foo.file"
And we record the a-mtime of "foo.file"
And I run `sleep 1`
And I run `touch -a foo.file`
Then the atime of "foo.file" changes

@steps
Scenario: Mtime
Given an empty file named "foo.file"
And we record the a/mtime of "foo.file"
And I run "sleep 1"
And I run "touch -m foo.file"
And we record the a-mtime of "foo.file"
And I run `sleep 1`
And I run `touch -m foo.file`
Then the mtime of "foo.file" changes

@steps
Expand Down Expand Up @@ -60,14 +60,14 @@ Feature: Examining files
"""
@steps
Scenario: File modes
When I run "touch filemode.file"
And I run "chmod 644 filemode.file"
Then the file "filemode.file" has mode "644"
And the file "filemode.file" has mode "0644"
When I run `touch filemode.file`
And I run `chmod 644 filemode.file`
Then the file "filemode.file" has decimal mode "644"
And the file "filemode.file" has decimal mode "0644"

@steps
Scenario: Directory exists
When I run "mkdir -p dirtest"
When I run `mkdir -p dirtest`
Then the directory "dirtest" exists

@steps
Expand All @@ -76,9 +76,9 @@ Feature: Examining files

@steps
Scenario: Directory mode
When I run "mkdir -p dirtest"
And I run "chmod 755 dirtest"
Then the directory "dirtest" has mode "755"
And the directory "dirtest" has mode "0755"
When I run `mkdir -p dirtest`
And I run `chmod 755 dirtest`
Then the directory "dirtest" has decimal mode "755"
And the directory "dirtest" has decimal mode "0755"


28 changes: 0 additions & 28 deletions features/ssh.feature

This file was deleted.

0 comments on commit 868dfe8

Please sign in to comment.