Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dir should not exist #15

Merged
1 commit merged into from
Sep 28, 2010
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion features/file_system_commands.feature
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,17 @@ Feature: file system commands
Then the following directories should exist:
| foo/bar |
| foo/bla |


Scenario: check for absence of directories
Given a directory named "foo/bar"
Given a directory named "foo/bla"
Then the following step should fail with Spec::Expectations::ExpectationNotMetError:
"""
Then the following directories should not exist:
| foo/bar/ |
| foo/bla/ |
"""

Scenario: Check file contents
Given a file named "foo" with:
"""
Expand Down
4 changes: 4 additions & 0 deletions features/step_definitions/aruba_dev_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@
Then /^aruba should fail with "([^"]*)"$/ do |error_message|
@aruba_exception.message.should =~ compile_and_escape(error_message)
end

Then /^the following step should fail with Spec::Expectations::ExpectationNotMetError:$/ do |multiline_step|
proc {steps multiline_step}.should raise_error(RSpec::Expectations::ExpectationNotMetError)
end
2 changes: 1 addition & 1 deletion lib/aruba/cucumber.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
end

Then /^the following directories should not exist:$/ do |directories|
check_file_presence(directories.raw.map{|directory_row| directory_row[0]}, false)
check_directory_presence(directories.raw.map{|directory_row| directory_row[0]}, false)
end

Then /^the file "([^"]*)" should contain "([^"]*)"$/ do |file, partial_content|
Expand Down