aruba 0.1.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -20,4 +20,3 @@ pkg
20
20
 
21
21
  ## PROJECT::SPECIFIC
22
22
  tmp
23
- *.gemspec
@@ -1,3 +1,35 @@
1
+ == 0.2.0
2
+
3
+ === New Features
4
+ * Added aruba.gemspec. (David Chelimsky)
5
+
6
+ === Changed features
7
+ * Several step definitions regarding output have changed. (#1 Aslak Hellesøy)
8
+
9
+ - /^I should see "([^\"]*)"$/
10
+ + /^the output should contain "([^"]*)"$/
11
+
12
+ - /^I should not see "([^\"]*)"$/
13
+ + /^the output should not contain "([^"]*)"$/
14
+
15
+ - /^I should see:$/
16
+ + /^the output should contain:$/
17
+
18
+ - /^I should not see:$/
19
+ + /^the output should not contain:$/
20
+
21
+ - /^I should see exactly "([^\"]*)"$/
22
+ + /^the output should contain exactly "([^"]*)"$/
23
+
24
+ - /^I should see exactly:$/
25
+ + /^the output should contain exactly:$/
26
+
27
+ - /^I should see matching \/([^\/]*)\/$/
28
+ + /^the output should match \/([^\/]*)\/$/
29
+
30
+ - /^I should see matching:$/
31
+ + /^the output should match:$/
32
+
1
33
  == 0.1.9
2
34
  * If the GOTGEMS environment variable is set, bundler won't run (faster). (Aslak Hellesøy)
3
35
 
@@ -23,8 +23,8 @@ with specific versions of Ruby (regardless of what Ruby version you're using to
23
23
 
24
24
  This is done with the follwoing step definitions:
25
25
 
26
- /^I am using rvm "([^\"]*)"$/
27
- /^I am using rvm gemset "([^\"]*)"$/
26
+ /^I am using rvm "([^"]*)"$/
27
+ /^I am using rvm gemset "([^"]*)"$/
28
28
 
29
29
  Then, if you use the step definition:
30
30
 
data/Rakefile CHANGED
@@ -5,15 +5,15 @@ require 'rake'
5
5
  begin
6
6
  require 'jeweler'
7
7
  Jeweler::Tasks.new do |gem|
8
- gem.version = "0.1.9"
8
+ gem.version = "0.2.0"
9
9
  gem.name = "aruba"
10
10
  gem.summary = %Q{CLI Steps for Cucumber}
11
11
  gem.description = %Q{CLI Steps for Cucumber, hand-crafted for you in Aruba}
12
12
  gem.email = "cukes@googlegroups.com"
13
13
  gem.homepage = "http://github.com/aslakhellesoy/aruba"
14
14
  gem.authors = ["Aslak Hellesøy", "David Chelimsky"]
15
- gem.add_development_dependency "rspec", ">= 1.3.0"
16
- gem.add_development_dependency "cucumber", ">= 0.7.0.beta.6"
15
+ gem.add_development_dependency "rspec", ">= 2.0.0.beta.15"
16
+ gem.add_development_dependency "cucumber", ">= 0.8.2"
17
17
  end
18
18
  Jeweler::GemcutterTasks.new
19
19
  rescue LoadError
@@ -0,0 +1,60 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{aruba}
8
+ s.version = "0.2.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Aslak Helles\303\270y", "David Chelimsky"]
12
+ s.date = %q{2010-07-07}
13
+ s.description = %q{CLI Steps for Cucumber, hand-crafted for you in Aruba}
14
+ s.email = %q{cukes@googlegroups.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "History.txt",
23
+ "LICENSE",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "aruba.gemspec",
27
+ "config/.gitignore",
28
+ "features/exit_statuses.feature",
29
+ "features/file_system_commands.feature",
30
+ "features/output.feature",
31
+ "features/running_ruby.feature",
32
+ "features/step_definitions/aruba_dev_steps.rb",
33
+ "features/support/env.rb",
34
+ "lib/aruba.rb",
35
+ "lib/aruba/api.rb",
36
+ "lib/aruba/cucumber.rb"
37
+ ]
38
+ s.homepage = %q{http://github.com/aslakhellesoy/aruba}
39
+ s.rdoc_options = ["--charset=UTF-8"]
40
+ s.require_paths = ["lib"]
41
+ s.rubygems_version = %q{1.3.7}
42
+ s.summary = %q{CLI Steps for Cucumber}
43
+
44
+ if s.respond_to? :specification_version then
45
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
46
+ s.specification_version = 3
47
+
48
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
+ s.add_development_dependency(%q<rspec>, [">= 2.0.0.beta.15"])
50
+ s.add_development_dependency(%q<cucumber>, [">= 0.8.2"])
51
+ else
52
+ s.add_dependency(%q<rspec>, [">= 2.0.0.beta.15"])
53
+ s.add_dependency(%q<cucumber>, [">= 0.8.2"])
54
+ end
55
+ else
56
+ s.add_dependency(%q<rspec>, [">= 2.0.0.beta.15"])
57
+ s.add_dependency(%q<cucumber>, [">= 0.8.2"])
58
+ end
59
+ end
60
+
@@ -15,7 +15,7 @@ Feature: file system commands
15
15
  puts "hello world"
16
16
  """
17
17
  When I run "ruby foo/bar/example.rb"
18
- Then I should see "hello world"
18
+ Then the output should contain "hello world"
19
19
 
20
20
  Scenario: append to a file
21
21
  Given a file named "foo/bar/example.rb" with:
@@ -27,13 +27,13 @@ Feature: file system commands
27
27
  puts "this was appended"
28
28
  """
29
29
  When I run "ruby foo/bar/example.rb"
30
- Then I should see "hello world"
31
- And I should see "this was appended"
30
+ Then the output should contain "hello world"
31
+ And the output should contain "this was appended"
32
32
 
33
33
  Scenario: clean up files generated in previous scenario
34
34
  When I run "ruby foo/bar/example.rb"
35
35
  Then the exit status should be 1
36
- And I should see "No such file or directory -- foo/bar/example.rb"
36
+ And the output should contain "No such file or directory -- foo/bar/example.rb"
37
37
 
38
38
  Scenario: change to a subdir
39
39
  Given a file named "foo/bar/example.rb" with:
@@ -42,7 +42,7 @@ Feature: file system commands
42
42
  """
43
43
  When I cd to "foo/bar"
44
44
  And I run "ruby example.rb"
45
- Then I should see "hello world"
45
+ Then the output should contain "hello world"
46
46
 
47
47
  Scenario: Reset current directory from previous scenario
48
48
  When I run "ruby example.rb"
@@ -67,6 +67,13 @@ Feature: file system commands
67
67
  Scenario: Check for absence of files
68
68
  Then the following files should not exist:
69
69
  | lorem/ipsum/dolor |
70
+
71
+ Scenario: Check for presence of a subset of directories
72
+ Given a directory named "foo/bar"
73
+ Given a directory named "foo/bla"
74
+ Then the following directories should exist:
75
+ | foo/bar |
76
+ | foo/bla |
70
77
 
71
78
  Scenario: Check file contents
72
79
  Given a file named "foo" with:
@@ -2,41 +2,48 @@ Feature: Output
2
2
 
3
3
  In order to specify expected output
4
4
  As a developer using Cucumber
5
- I want to use the "I should see" step
5
+ I want to use the "the output should contain" step
6
+
7
+ Scenario: Run unknown command
8
+ When I run "neverever gonna work"
9
+ Then the output should contain:
10
+ """
11
+ sh: neverever: command not found
12
+ """
6
13
 
7
14
  Scenario: Detect subset of one-line output
8
15
  When I run "ruby -e 'puts \"hello world\"'"
9
- Then I should see "hello world"
16
+ Then the output should contain "hello world"
10
17
 
11
18
  Scenario: Detect subset of one-line output
12
19
  When I run "echo 'hello world'"
13
- Then I should see "hello world"
20
+ Then the output should contain "hello world"
14
21
 
15
22
  Scenario: Detect absence of one-line output
16
23
  When I run "ruby -e 'puts \"hello world\"'"
17
- Then I should not see "good-bye"
24
+ Then the output should not contain "good-bye"
18
25
 
19
26
  Scenario: Detect subset of multiline output
20
27
  When I run "ruby -e 'puts \"hello\\nworld\"'"
21
- Then I should see:
28
+ Then the output should contain:
22
29
  """
23
30
  hello
24
31
  """
25
32
 
26
33
  Scenario: Detect subset of multiline output
27
34
  When I run "ruby -e 'puts \"hello\\nworld\"'"
28
- Then I should not see:
35
+ Then the output should not contain:
29
36
  """
30
37
  good-bye
31
38
  """
32
39
 
33
40
  Scenario: Detect exact one-line output
34
41
  When I run "ruby -e 'puts \"hello world\"'"
35
- Then I should see exactly "hello world\n"
42
+ Then the output should contain exactly "hello world\n"
36
43
 
37
44
  Scenario: Detect exact multiline output
38
45
  When I run "ruby -e 'puts \"hello\\nworld\"'"
39
- Then I should see exactly:
46
+ Then the output should contain exactly:
40
47
  """
41
48
  hello
42
49
  world
@@ -46,13 +53,13 @@ Feature: Output
46
53
  @announce
47
54
  Scenario: Detect subset of one-line output with regex
48
55
  When I run "ruby --version"
49
- Then I should see "ruby"
50
- And I should see matching /ruby ([\d]+\.[\d]+\.[\d]+)(p\d+)? \(.*$/
56
+ Then the output should contain "ruby"
57
+ And the output should match /ruby ([\d]+\.[\d]+\.[\d]+)(p\d+)? \(.*$/
51
58
 
52
59
  @announce
53
60
  Scenario: Detect subset of multiline output with regex
54
61
  When I run "ruby -e 'puts \"hello\\nworld\\nextra line1\\nextra line2\\nimportant line\"'"
55
- Then I should see matching:
62
+ Then the output should match:
56
63
  """
57
64
  he..o
58
65
  wor.d
@@ -7,51 +7,46 @@ Feature: Running ruby
7
7
  Scenario: Run with ruby 1.9.1
8
8
  Given I am using rvm "1.9.1"
9
9
  When I run "ruby -e 'puts RUBY_VERSION'"
10
- Then I should see "ruby-1.9.1-p378"
11
- And I should not see "rvm usage"
10
+ Then the output should contain "ruby-1.9.1-p378"
11
+ And the output should not contain "rvm usage"
12
12
 
13
13
  Scenario: Run with ruby JRuby
14
- Given I am using rvm "jruby-1.4.0"
14
+ Given I am using rvm "jruby"
15
15
  When I run "ruby -e 'puts JRUBY_VERSION'"
16
- Then I should see "1.4.0"
17
- And I should not see "rvm usage"
16
+ Then the output should contain "1.5.1"
17
+ And the output should not contain "rvm usage"
18
18
 
19
19
  Scenario: Install gems with bundler
20
20
  Given I am using rvm "1.9.1"
21
21
  And I am using rvm gemset "a-new-gemset-where-no-gems-are-installed" with Gemfile:
22
22
  """
23
+ source :gemcutter
23
24
  gem 'diff-lcs', '1.1.2'
24
25
  """
25
26
  When I run "gem list"
26
- Then I should see matching:
27
+ Then the output should match:
27
28
  """
28
29
  bundler \(\d+\.+\d+\.+\d+\)
29
30
  diff-lcs \(\d+\.+\d+\.+\d+\)
30
31
  """
31
32
 
32
- Scenario: Specify both rvm and gemset
33
- Given I am using rvm "1.9.1"
34
- And I am using an empty rvm gemset "a-new-gemset-where-no-gems-are-installed"
35
- When I run "gem list | wc -l"
36
- Then I should see exactly " 2\n"
37
-
38
33
  Scenario: Find the version of ruby 1.9.1
39
34
  Given I am using rvm "1.9.1"
40
35
  When I run "ruby --version"
41
- Then I should see "1.9.1"
36
+ Then the output should contain "1.9.1"
42
37
 
43
38
  Scenario: Find the version of cucumber on ruby 1.9.1
44
39
  Given I am using rvm "1.9.1"
45
40
  When I run "cucumber --version"
46
- Then I should see matching /\d+\.+\d+\.+\d+/
41
+ Then the output should match /\d+\.+\d+\.+\d+/
47
42
 
48
43
  Scenario: Use current ruby
49
44
  When I run "ruby --version"
50
- Then I should see the current Ruby version
45
+ Then the output should contain the current Ruby version
51
46
 
52
47
  Scenario: Use current ruby and a gem bin file
53
48
  When I run "rake --version"
54
- Then I should see "rake, version"
49
+ Then the output should contain "rake, version"
55
50
 
56
51
  # I have trouble running rvm 1.8.7 in OS X Leopard, which is
57
52
  # ruby-1.8.7-p249 (It segfaults rather often). However, a previous
@@ -70,7 +65,7 @@ Feature: Running ruby
70
65
  """
71
66
  And I am using rvm "1.8.7"
72
67
  When I run "ruby --version"
73
- Then I should see "patchlevel 174"
68
+ Then the output should contain "patchlevel 174"
74
69
 
75
70
  # To verify this, make sure current rvm is *not* JRuby and run:
76
71
  #
@@ -78,4 +73,4 @@ Feature: Running ruby
78
73
  @jruby
79
74
  Scenario: Don't use rvm, but default to same Ruby as the one that launched Cucumber
80
75
  When I run "ruby -e 'puts JRUBY_VERSION if defined?(JRUBY_VERSION)'"
81
- Then I should see the JRuby version
76
+ Then the output should contain the JRuby version
@@ -1,4 +1,4 @@
1
- Given /^I have a local file named "([^\"]*)" with:$/ do |filename, content|
1
+ Given /^I have a local file named "([^"]*)" with:$/ do |filename, content|
2
2
  File.open(filename, 'w') {|io| io.write(content)}
3
3
  end
4
4
 
@@ -10,15 +10,15 @@ When /^I do aruba (.*)$/ do |aruba_step|
10
10
  end
11
11
  end
12
12
 
13
- Then /^I should see the JRuby version$/ do
13
+ Then /^the output should contain the JRuby version$/ do
14
14
  pending "This must be manually run in JRuby" unless defined?(JRUBY_VERSION)
15
- Then %{I should see "#{JRUBY_VERSION}"}
15
+ Then %{the output should contain "#{JRUBY_VERSION}"}
16
16
  end
17
17
 
18
- Then /^I should see the current Ruby version$/ do
19
- Then %{I should see "#{RUBY_VERSION}"}
18
+ Then /^the output should contain the current Ruby version$/ do
19
+ Then %{the output should contain "#{RUBY_VERSION}"}
20
20
  end
21
21
 
22
- Then /^aruba should fail with "([^\"]*)"$/ do |error_message|
22
+ Then /^aruba should fail with "([^"]*)"$/ do |error_message|
23
23
  @aruba_exception.message.should =~ compile_and_escape(error_message)
24
24
  end
@@ -63,6 +63,18 @@ module Api
63
63
  end
64
64
  end
65
65
  end
66
+
67
+ def check_directory_presence(paths, expect_presence)
68
+ in_current_dir do
69
+ paths.each do |path|
70
+ if expect_presence
71
+ File.should be_directory(path)
72
+ else
73
+ File.should_not be_directory(path)
74
+ end
75
+ end
76
+ end
77
+ end
66
78
 
67
79
  def _mkdir(dir_name)
68
80
  FileUtils.mkdir_p(dir_name) unless File.directory?(dir_name)
@@ -118,7 +130,7 @@ module Api
118
130
  cmd = detect_ruby_script(cmd)
119
131
  cmd = detect_ruby(cmd)
120
132
 
121
- announce("$ #{cmd}") if @announce_cmd
133
+ announce_or_puts("$ #{cmd}") if @announce_cmd
122
134
 
123
135
  stderr_file = Tempfile.new('cucumber')
124
136
  stderr_file.close
@@ -127,14 +139,14 @@ module Api
127
139
  IO.popen("#{cmd} 2> #{stderr_file.path}", mode) do |io|
128
140
  @last_stdout = io.read
129
141
 
130
- announce(@last_stdout) if @announce_stdout
142
+ announce_or_puts(@last_stdout) if @announce_stdout
131
143
  end
132
144
 
133
145
  @last_exit_status = $?.exitstatus
134
146
  end
135
147
  @last_stderr = IO.read(stderr_file.path)
136
148
 
137
- announce(@last_stderr) if @announce_stderr
149
+ announce_or_puts(@last_stderr) if @announce_stderr
138
150
 
139
151
  if(@last_exit_status != 0 && fail_on_error)
140
152
  fail("Exit status was #{@last_exit_status}. Output:\n#{combined_output}")
@@ -143,6 +155,14 @@ module Api
143
155
  @last_stderr
144
156
  end
145
157
 
158
+ def announce_or_puts(msg)
159
+ if(@puts)
160
+ puts(msg)
161
+ else
162
+ announce(msg)
163
+ end
164
+ end
165
+
146
166
  def detect_ruby(cmd)
147
167
  if cmd =~ /^ruby\s/
148
168
  cmd.gsub(/^ruby\s/, "#{current_ruby} ")
@@ -6,6 +6,10 @@ Before do
6
6
  FileUtils.rm_rf(current_dir)
7
7
  end
8
8
 
9
+ Before('@puts') do
10
+ @puts = true
11
+ end
12
+
9
13
  Before('@announce-cmd') do
10
14
  @announce_cmd = true
11
15
  end
@@ -24,36 +28,40 @@ Before('@announce') do
24
28
  @announce_cmd = true
25
29
  end
26
30
 
27
- Given /^I am using rvm "([^\"]*)"$/ do |rvm_ruby_version|
31
+ Given /^I am using rvm "([^"]*)"$/ do |rvm_ruby_version|
28
32
  use_rvm(rvm_ruby_version)
29
33
  end
30
34
 
31
- Given /^I am using( an empty)? rvm gemset "([^\"]*)"$/ do |empty_gemset, rvm_gemset|
35
+ Given /^I am using( an empty)? rvm gemset "([^"]*)"$/ do |empty_gemset, rvm_gemset|
32
36
  use_rvm_gemset(rvm_gemset, empty_gemset)
33
37
  end
34
38
 
35
- Given /^I am using rvm gemset "([^\"]*)" with Gemfile:$/ do |rvm_gemset, gemfile|
39
+ Given /^I am using rvm gemset "([^"]*)" with Gemfile:$/ do |rvm_gemset, gemfile|
36
40
  use_rvm_gemset(rvm_gemset, true)
37
41
  install_gems(gemfile)
38
42
  end
39
43
 
40
- Given /^a directory named "([^\"]*)"$/ do |dir_name|
44
+ Given /^a directory named "([^"]*)"$/ do |dir_name|
41
45
  create_dir(dir_name)
42
46
  end
43
47
 
44
- Given /^a file named "([^\"]*)" with:$/ do |file_name, file_content|
48
+ Given /^a file named "([^"]*)" with:$/ do |file_name, file_content|
45
49
  create_file(file_name, file_content)
46
50
  end
47
51
 
48
- Given /^an empty file named "([^\"]*)"$/ do |file_name|
52
+ Given /^an empty file named "([^"]*)"$/ do |file_name|
49
53
  create_file(file_name, "")
50
54
  end
51
55
 
52
- When /^I append to "([^\"]*)" with:$/ do |file_name, file_content|
56
+ When /^I write to "([^"]*)" with:$/ do |file_name, file_content|
57
+ create_file(file_name, file_content)
58
+ end
59
+
60
+ When /^I append to "([^"]*)" with:$/ do |file_name, file_content|
53
61
  append_to_file(file_name, file_content)
54
62
  end
55
63
 
56
- When /^I cd to "([^\"]*)"$/ do |dir|
64
+ When /^I cd to "([^"]*)"$/ do |dir|
57
65
  cd(dir)
58
66
  end
59
67
 
@@ -65,39 +73,39 @@ When /^I successfully run "(.*)"$/ do |cmd|
65
73
  run(unescape(cmd))
66
74
  end
67
75
 
68
- Then /^I should see "([^\"]*)"$/ do |partial_output|
76
+ Then /^the output should contain "([^"]*)"$/ do |partial_output|
69
77
  combined_output.should =~ compile_and_escape(partial_output)
70
78
  end
71
79
 
72
- Then /^I should not see "([^\"]*)"$/ do |partial_output|
80
+ Then /^the output should not contain "([^"]*)"$/ do |partial_output|
73
81
  combined_output.should_not =~ compile_and_escape(partial_output)
74
82
  end
75
83
 
76
- Then /^I should see:$/ do |partial_output|
84
+ Then /^the output should contain:$/ do |partial_output|
77
85
  combined_output.should =~ compile_and_escape(partial_output)
78
86
  end
79
87
 
80
- Then /^I should not see:$/ do |partial_output|
88
+ Then /^the output should not contain:$/ do |partial_output|
81
89
  combined_output.should_not =~ compile_and_escape(partial_output)
82
90
  end
83
91
 
84
- Then /^I should see exactly "([^\"]*)"$/ do |exact_output|
92
+ Then /^the output should contain exactly "([^"]*)"$/ do |exact_output|
85
93
  combined_output.should == unescape(exact_output)
86
94
  end
87
95
 
88
- Then /^I should see exactly:$/ do |exact_output|
96
+ Then /^the output should contain exactly:$/ do |exact_output|
89
97
  combined_output.should == exact_output
90
98
  end
91
99
 
92
- # "I should see matching" allows regex in the partial_output, if
93
- # you don't need regex, use "I should see" instead since
100
+ # "the output should match" allows regex in the partial_output, if
101
+ # you don't need regex, use "the output should contain" instead since
94
102
  # that way, you don't have to escape regex characters that
95
103
  # appear naturally in the output
96
- Then /^I should see matching \/([^\/]*)\/$/ do |partial_output|
104
+ Then /^the output should match \/([^\/]*)\/$/ do |partial_output|
97
105
  combined_output.should =~ /#{partial_output}/
98
106
  end
99
107
 
100
- Then /^I should see matching:$/ do |partial_output|
108
+ Then /^the output should match:$/ do |partial_output|
101
109
  combined_output.should =~ /#{partial_output}/m
102
110
  end
103
111
 
@@ -110,7 +118,7 @@ Then /^the exit status should not be (\d+)$/ do |exit_status|
110
118
  end
111
119
 
112
120
  Then /^it should (pass|fail) with:$/ do |pass_fail, partial_output|
113
- Then "I should see:", partial_output
121
+ Then "the output should contain:", partial_output
114
122
  if pass_fail == 'pass'
115
123
  @last_exit_status.should == 0
116
124
  else
@@ -118,19 +126,19 @@ Then /^it should (pass|fail) with:$/ do |pass_fail, partial_output|
118
126
  end
119
127
  end
120
128
 
121
- Then /^the stderr should contain "([^\"]*)"$/ do |partial_output|
129
+ Then /^the stderr should contain "([^"]*)"$/ do |partial_output|
122
130
  @last_stderr.should =~ compile_and_escape(partial_output)
123
131
  end
124
132
 
125
- Then /^the stdout should contain "([^\"]*)"$/ do |partial_output|
133
+ Then /^the stdout should contain "([^"]*)"$/ do |partial_output|
126
134
  @last_stdout.should =~ compile_and_escape(partial_output)
127
135
  end
128
136
 
129
- Then /^the stderr should not contain "([^\"]*)"$/ do |partial_output|
137
+ Then /^the stderr should not contain "([^"]*)"$/ do |partial_output|
130
138
  @last_stderr.should_not =~ compile_and_escape(partial_output)
131
139
  end
132
140
 
133
- Then /^the stdout should not contain "([^\"]*)"$/ do |partial_output|
141
+ Then /^the stdout should not contain "([^"]*)"$/ do |partial_output|
134
142
  @last_stdout.should_not =~ compile_and_escape(partial_output)
135
143
  end
136
144
 
@@ -142,10 +150,18 @@ Then /^the following files should not exist:$/ do |files|
142
150
  check_file_presence(files.raw.map{|file_row| file_row[0]}, false)
143
151
  end
144
152
 
145
- Then /^the file "([^\"]*)" should contain "([^\"]*)"$/ do |file, partial_content|
153
+ Then /^the following directories should exist:$/ do |directories|
154
+ check_directory_presence(directories.raw.map{|directory_row| directory_row[0]}, true)
155
+ end
156
+
157
+ Then /^the following directories should not exist:$/ do |directories|
158
+ check_file_presence(directories.raw.map{|directory_row| directory_row[0]}, false)
159
+ end
160
+
161
+ Then /^the file "([^"]*)" should contain "([^"]*)"$/ do |file, partial_content|
146
162
  check_file_content(file, partial_content, true)
147
163
  end
148
164
 
149
- Then /^the file "([^\"]*)" should not contain "([^\"]*)"$/ do |file, partial_content|
165
+ Then /^the file "([^"]*)" should not contain "([^"]*)"$/ do |file, partial_content|
150
166
  check_file_content(file, partial_content, false)
151
167
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aruba
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 23
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
- - 1
8
- - 9
9
- version: 0.1.9
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
10
11
  platform: ruby
11
12
  authors:
12
13
  - "Aslak Helles\xC3\xB8y"
@@ -15,37 +16,41 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-05-04 00:00:00 +02:00
19
+ date: 2010-07-07 00:00:00 +02:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
22
23
  name: rspec
23
24
  prerelease: false
24
25
  requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
25
27
  requirements:
26
28
  - - ">="
27
29
  - !ruby/object:Gem::Version
30
+ hash: 62196477
28
31
  segments:
29
- - 1
30
- - 3
32
+ - 2
33
+ - 0
31
34
  - 0
32
- version: 1.3.0
35
+ - beta
36
+ - 15
37
+ version: 2.0.0.beta.15
33
38
  type: :development
34
39
  version_requirements: *id001
35
40
  - !ruby/object:Gem::Dependency
36
41
  name: cucumber
37
42
  prerelease: false
38
43
  requirement: &id002 !ruby/object:Gem::Requirement
44
+ none: false
39
45
  requirements:
40
46
  - - ">="
41
47
  - !ruby/object:Gem::Version
48
+ hash: 59
42
49
  segments:
43
50
  - 0
44
- - 7
45
- - 0
46
- - beta
47
- - 6
48
- version: 0.7.0.beta.6
51
+ - 8
52
+ - 2
53
+ version: 0.8.2
49
54
  type: :development
50
55
  version_requirements: *id002
51
56
  description: CLI Steps for Cucumber, hand-crafted for you in Aruba
@@ -64,6 +69,7 @@ files:
64
69
  - LICENSE
65
70
  - README.rdoc
66
71
  - Rakefile
72
+ - aruba.gemspec
67
73
  - config/.gitignore
68
74
  - features/exit_statuses.feature
69
75
  - features/file_system_commands.feature
@@ -84,23 +90,27 @@ rdoc_options:
84
90
  require_paths:
85
91
  - lib
86
92
  required_ruby_version: !ruby/object:Gem::Requirement
93
+ none: false
87
94
  requirements:
88
95
  - - ">="
89
96
  - !ruby/object:Gem::Version
97
+ hash: 3
90
98
  segments:
91
99
  - 0
92
100
  version: "0"
93
101
  required_rubygems_version: !ruby/object:Gem::Requirement
102
+ none: false
94
103
  requirements:
95
104
  - - ">="
96
105
  - !ruby/object:Gem::Version
106
+ hash: 3
97
107
  segments:
98
108
  - 0
99
109
  version: "0"
100
110
  requirements: []
101
111
 
102
112
  rubyforge_project:
103
- rubygems_version: 1.3.6
113
+ rubygems_version: 1.3.7
104
114
  signing_key:
105
115
  specification_version: 3
106
116
  summary: CLI Steps for Cucumber