aruba 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ == 0.3.6
2
+
3
+ * Changed default value of @aruba_timeout_seconds from 1 to 3. (Aslak Hellesøy)
4
+ * Separate hooks and steps to make it easier to build your own steps on top of Aruba's API (Mike Sassak)
5
+ * @no-clobber to prevent cleanup before each scenario (Mike Sassak)
6
+
1
7
  == 0.3.5
2
8
 
3
9
  === Bugfixes
@@ -15,9 +15,11 @@ You now have a bunch of step definitions that you can use in your features. Look
15
15
  to see all the step definitions. Look at features/*.feature for examples (which are also testing Aruba
16
16
  itself).
17
17
 
18
- == Getting more output with tags.
18
+ == Tags
19
19
 
20
- Aruba has several tags you can use to get more information. You can put these tags on individual scenarios, or on a feature. The tags are:
20
+ Aruba has tags you can put on on individual scenarios, or on a feature.
21
+
22
+ To get more information use these tags:
21
23
 
22
24
  * <tt>@announce-cmd</tt> - See what command is is run
23
25
  * <tt>@announce-stdout</tt> - See the stdout
@@ -26,6 +28,10 @@ Aruba has several tags you can use to get more information. You can put these ta
26
28
  * <tt>@announce-env</tt> - See environment variables set by Aruba
27
29
  * <tt>@announce</tt> - Does all of the above
28
30
 
31
+ To prevent Aruba from removing its working directory before each scenario:
32
+
33
+ * <tt>@no-clobber</tt> - Don't cleanup before scenarios
34
+
29
35
  == Runtime Configuration
30
36
 
31
37
  Per default Aruba will create a directory <tt>tmp/aruba</tt> where it performs it's file operations.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'aruba'
5
- s.version = '0.3.5'
5
+ s.version = '0.3.6'
6
6
  s.authors = ["Aslak Hellesøy", "David Chelimsky", "Mike Sassak"]
7
7
  s.description = 'CLI Steps for Cucumber, hand-crafted for you in Aruba'
8
8
  s.summary = "aruba-#{s.version}"
@@ -0,0 +1,25 @@
1
+ Feature: No clobber
2
+
3
+ By default Aruba removes its scratch directory before
4
+ every scenario. This isn't always the right thing
5
+ to do, especially when the path to the default directory
6
+ has been changed. Use @no-clobber to stop Aruba from
7
+ cleaning up after itself.
8
+
9
+ Scenario: Change the filesystem
10
+ Given a directory named "foo/bar"
11
+ And a file named "foo/bar/baz.txt" with:
12
+ """
13
+ I don't want to die!
14
+ """
15
+
16
+ @no-clobber
17
+ Scenario: Verify nothing was clobbered
18
+ Then a file named "foo/bar/baz.txt" should exist
19
+ And the file "foo/bar/baz.txt" should contain exactly:
20
+ """
21
+ I don't want to die!
22
+ """
23
+
24
+ Scenario: Cleanup and verify the previous scenario
25
+ Then a file named "foo/bar/baz.txt" should not exist
@@ -215,7 +215,7 @@ module Aruba
215
215
  end
216
216
  end
217
217
 
218
- DEFAULT_TIMEOUT_SECONDS = 1
218
+ DEFAULT_TIMEOUT_SECONDS = 3
219
219
 
220
220
  def exit_timeout
221
221
  @aruba_timeout_seconds || DEFAULT_TIMEOUT_SECONDS
@@ -1,60 +1,8 @@
1
1
  require 'aruba/api'
2
+ require 'aruba/hooks'
2
3
 
3
4
  World(Aruba::Api)
4
5
 
5
- Before('@disable-bundler') do
6
- unset_bundler_env_vars
7
- end
8
-
9
- Before do
10
- @__aruba_original_paths = (ENV['PATH'] || '').split(File::PATH_SEPARATOR)
11
- ENV['PATH'] = ([File.expand_path('bin')] + @__aruba_original_paths).join(File::PATH_SEPARATOR)
12
- end
13
-
14
- After do
15
- ENV['PATH'] = @__aruba_original_paths.join(File::PATH_SEPARATOR)
16
- end
17
-
18
- Before do
19
- FileUtils.rm_rf(current_dir)
20
- end
21
-
22
- Before('@puts') do
23
- @puts = true
24
- end
25
-
26
- Before('@announce-cmd') do
27
- @announce_cmd = true
28
- end
29
-
30
- Before('@announce-stdout') do
31
- @announce_stdout = true
32
- end
33
-
34
- Before('@announce-stderr') do
35
- @announce_stderr = true
36
- end
37
-
38
- Before('@announce-dir') do
39
- @announce_dir = true
40
- end
41
-
42
- Before('@announce-env') do
43
- @announce_env = true
44
- end
45
-
46
- Before('@announce') do
47
- @announce_stdout = true
48
- @announce_stderr = true
49
- @announce_cmd = true
50
- @announce_dir = true
51
- @announce_env = true
52
- end
53
-
54
- After do
55
- restore_env
56
- end
57
-
58
6
  Given /^I'm using a clean gemset "([^"]*)"$/ do |gemset|
59
7
  use_clean_gemset(gemset)
60
8
  end
@@ -0,0 +1,52 @@
1
+ Before('@disable-bundler') do
2
+ unset_bundler_env_vars
3
+ end
4
+
5
+ Before do
6
+ @__aruba_original_paths = (ENV['PATH'] || '').split(File::PATH_SEPARATOR)
7
+ ENV['PATH'] = ([File.expand_path('bin')] + @__aruba_original_paths).join(File::PATH_SEPARATOR)
8
+ end
9
+
10
+ After do
11
+ ENV['PATH'] = @__aruba_original_paths.join(File::PATH_SEPARATOR)
12
+ end
13
+
14
+ Before('~@no-clobber') do
15
+ FileUtils.rm_rf(current_dir)
16
+ end
17
+
18
+ Before('@puts') do
19
+ @puts = true
20
+ end
21
+
22
+ Before('@announce-cmd') do
23
+ @announce_cmd = true
24
+ end
25
+
26
+ Before('@announce-stdout') do
27
+ @announce_stdout = true
28
+ end
29
+
30
+ Before('@announce-stderr') do
31
+ @announce_stderr = true
32
+ end
33
+
34
+ Before('@announce-dir') do
35
+ @announce_dir = true
36
+ end
37
+
38
+ Before('@announce-env') do
39
+ @announce_env = true
40
+ end
41
+
42
+ Before('@announce') do
43
+ @announce_stdout = true
44
+ @announce_stderr = true
45
+ @announce_cmd = true
46
+ @announce_dir = true
47
+ @announce_env = true
48
+ end
49
+
50
+ After do
51
+ restore_env
52
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: aruba
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.5
5
+ version: 0.3.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - "Aslak Helles\xC3\xB8y"
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2011-03-22 00:00:00 +00:00
15
+ date: 2011-04-13 00:00:00 +01:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
@@ -74,12 +74,14 @@ files:
74
74
  - features/file_system_commands.feature
75
75
  - features/flushing.feature
76
76
  - features/interactive.feature
77
+ - features/no_clobber.feature
77
78
  - features/output.feature
78
79
  - features/step_definitions/aruba_dev_steps.rb
79
80
  - features/support/env.rb
80
81
  - lib/aruba.rb
81
82
  - lib/aruba/api.rb
82
83
  - lib/aruba/cucumber.rb
84
+ - lib/aruba/hooks.rb
83
85
  - lib/aruba/process.rb
84
86
  has_rdoc: true
85
87
  homepage: http://github.com/aslakhellesoy/aruba
@@ -95,7 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
97
  requirements:
96
98
  - - ">="
97
99
  - !ruby/object:Gem::Version
98
- hash: 1240099733914019053
100
+ hash: 2534243452653753448
99
101
  segments:
100
102
  - 0
101
103
  version: "0"
@@ -104,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
106
  requirements:
105
107
  - - ">="
106
108
  - !ruby/object:Gem::Version
107
- hash: 1240099733914019053
109
+ hash: 2534243452653753448
108
110
  segments:
109
111
  - 0
110
112
  version: "0"
@@ -114,12 +116,13 @@ rubyforge_project:
114
116
  rubygems_version: 1.6.2
115
117
  signing_key:
116
118
  specification_version: 3
117
- summary: aruba-0.3.5
119
+ summary: aruba-0.3.6
118
120
  test_files:
119
121
  - features/exit_statuses.feature
120
122
  - features/file_system_commands.feature
121
123
  - features/flushing.feature
122
124
  - features/interactive.feature
125
+ - features/no_clobber.feature
123
126
  - features/output.feature
124
127
  - features/step_definitions/aruba_dev_steps.rb
125
128
  - features/support/env.rb