Addresses GH #39
Addresses GH #51 which should really be re-opened ;)
# For complete Aruba step listing see:
# lib/aruba/cucumber.rb
# or https://github.com/aslakhellesoy/aruba/blob/master/lib/aruba/cucumber.rb
Feature: Examining files
In order to test a running system
As an administrator
I want to use Aruba steps to examine files
@steps
Scenario: File exists # /usr/src/cucumber-nagios/features/files.feature:10
Given an empty file named "tmp/foo.file" # aruba-0.3.2/lib/aruba/cucumber.rb:70
Then a file named "tmp/foo.file" should exist # aruba-0.3.2/lib/aruba/cucumber.rb:247
@steps
Scenario: File does not exist # /usr/src/cucumber-nagios/features/files.feature:15
Then a file named "tmp/foo.filepants" should not exist # aruba-0.3.2/lib/aruba/cucumber.rb:251
@steps
Scenario: Atime # /usr/src/cucumber-nagios/features/files.feature:19
Given an empty file named "/tmp/foo.file" # aruba-0.3.2/lib/aruba/cucumber.rb:70
And we have the atime/mtime of '/tmp/foo.file' # lib/cuken/cucumber/file.rb:3
And I run "sleep 1" # aruba-0.3.2/lib/aruba/cucumber.rb:94
And I run "touch -a /tmp/foo.file" # aruba-0.3.2/lib/aruba/cucumber.rb:94
Then the atime of '/tmp/foo.file' should be different # lib/cuken/cucumber/file.rb:7
@steps
Scenario: Mtime # /usr/src/cucumber-nagios/features/files.feature:27
Given an empty file named "/tmp/foo.file" # aruba-0.3.2/lib/aruba/cucumber.rb:70
And we have the atime/mtime of '/tmp/foo.file' # lib/cuken/cucumber/file.rb:3
And I run "sleep 1" # aruba-0.3.2/lib/aruba/cucumber.rb:94
And I run "touch -m /tmp/foo.file" # aruba-0.3.2/lib/aruba/cucumber.rb:94
Then the mtime of '/tmp/foo.file' should be different # lib/cuken/cucumber/file.rb:7
@steps
Scenario: File contents # /usr/src/cucumber-nagios/features/files.feature:35
When I write to "tmp/monkeytest.file" with: # aruba-0.3.2/lib/aruba/cucumber.rb:74
"""
monkeypants
monkeyshorts
"""
Then the file "tmp/monkeytest.file" should contain exactly: # aruba-0.3.2/lib/aruba/cucumber.rb:279
"""
monkeypants
monkeyshorts
"""
@steps
Scenario: File contents multiple times # /usr/src/cucumber-nagios/features/files.feature:48
When I write to "tmp/monkeytest.file" with: # aruba-0.3.2/lib/aruba/cucumber.rb:74
"""
monkeypants
monkeyshorts
"""
And I append to "tmp/monkeytest.file" with: # aruba-0.3.2/lib/aruba/cucumber.rb:82
"""
monkeypants
monkeyshorts
"""
Then the file "tmp/monkeytest.file" should contain exactly: # aruba-0.3.2/lib/aruba/cucumber.rb:279
"""
monkeypants
monkeyshorts
monkeypants
monkeyshorts
"""
@steps
Scenario: File modes # /usr/src/cucumber-nagios/features/files.feature:69
When I run "touch /tmp/filemode.file" # aruba-0.3.2/lib/aruba/cucumber.rb:94
And I run "chmod 644 /tmp/filemode.file" # aruba-0.3.2/lib/aruba/cucumber.rb:94
Then the file named '/tmp/filemode.file' should have mode '644' # lib/cuken/cucumber/file.rb:11
And the file named '/tmp/filemode.file' should have mode '0644' # lib/cuken/cucumber/file.rb:11
@steps
Scenario: Directory exists # /usr/src/cucumber-nagios/features/files.feature:76
Given a directory named "tmp/dirtest" # aruba-0.3.2/lib/aruba/cucumber.rb:62
Then a directory named "tmp/dirtest" should exist # aruba-0.3.2/lib/aruba/cucumber.rb:263
@steps
Scenario: Directory does not exist # /usr/src/cucumber-nagios/features/files.feature:81
Then a directory named "tmp/dirtest-m000" should not exist # aruba-0.3.2/lib/aruba/cucumber.rb:267
@steps
Scenario: Directory mode # /usr/src/cucumber-nagios/features/files.feature:85
When I run "mkdir -p /tmp/dirtest" # aruba-0.3.2/lib/aruba/cucumber.rb:94
And I run "chmod 755 /tmp/dirtest" # aruba-0.3.2/lib/aruba/cucumber.rb:94
Then the directory named '/tmp/dirtest' should have mode '755' # lib/cuken/cucumber/file.rb:15
And the directory named '/tmp/dirtest' should have mode '0755' # lib/cuken/cucumber/file.rb:15
Closes GH #59 Closes GH #60
Addresses GH #39 Addresses GH #51 which should really be re-opened ;)