aruba 0.1.2 → 0.1.3
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/History.txt +3 -0
- data/Rakefile +12 -5
- data/aruba.gemspec +1 -1
- data/features/file_system_commands.feature +22 -2
- data/lib/aruba/api.rb +10 -1
- data/lib/aruba/cucumber.rb +4 -0
- metadata +2 -2
data/History.txt
CHANGED
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require 'rake'
|
|
4
4
|
begin
|
5
5
|
require 'jeweler'
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.version = "0.1.
|
7
|
+
gem.version = "0.1.3"
|
8
8
|
gem.name = "aruba"
|
9
9
|
gem.summary = %Q{CLI Steps for Cucumber}
|
10
10
|
gem.description = %Q{CLI Steps for Cucumber, hand-crafted for you in Aruba}
|
@@ -21,13 +21,20 @@ end
|
|
21
21
|
|
22
22
|
begin
|
23
23
|
require 'cucumber/rake/task'
|
24
|
-
|
25
|
-
|
24
|
+
|
25
|
+
namespace :cucumber do
|
26
|
+
Cucumber::Rake::Task.new(:pass) do |t|
|
27
|
+
t.cucumber_opts = '--tags ~@fail'
|
28
|
+
end
|
29
|
+
|
30
|
+
Cucumber::Rake::Task.new(:fail) do |t|
|
31
|
+
t.cucumber_opts = '--tags @fail --wip'
|
32
|
+
end
|
26
33
|
end
|
27
34
|
|
28
|
-
task :
|
35
|
+
task :cucumber => [:check_dependencies, 'cucumber:pass', 'cucumber:fail']
|
29
36
|
rescue LoadError
|
30
|
-
task :
|
37
|
+
task :cucumber do
|
31
38
|
abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
|
32
39
|
end
|
33
40
|
end
|
data/aruba.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{aruba}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Aslak Helles\303\270y", "David Chelimsky"]
|
@@ -17,8 +17,28 @@ Feature: file system commands
|
|
17
17
|
When I run "ruby foo/bar/example.rb"
|
18
18
|
Then I should see "hello world"
|
19
19
|
|
20
|
-
Scenario: clean up files generated in previous
|
20
|
+
Scenario: clean up files generated in previous scenario
|
21
21
|
When I run "ruby foo/bar/example.rb"
|
22
22
|
Then the exit status should be 1
|
23
23
|
And I should see "No such file or directory -- foo/bar/example.rb"
|
24
|
-
|
24
|
+
|
25
|
+
Scenario: change to a subdir
|
26
|
+
Given a file named "foo/bar/example.rb" with:
|
27
|
+
"""
|
28
|
+
puts "hello world"
|
29
|
+
"""
|
30
|
+
When I cd to "foo/bar"
|
31
|
+
And I run "ruby example.rb"
|
32
|
+
Then I should see "hello world"
|
33
|
+
|
34
|
+
Scenario: Reset current directory from previous scenario
|
35
|
+
When I run "ruby example.rb"
|
36
|
+
Then the exit status should be 1
|
37
|
+
|
38
|
+
@fail
|
39
|
+
Scenario: Holler if cd to bad dir
|
40
|
+
Given a file named "foo/bar/example.rb" with:
|
41
|
+
"""
|
42
|
+
puts "hello world"
|
43
|
+
"""
|
44
|
+
When I cd to "foo/nonexistant"
|
data/lib/aruba/api.rb
CHANGED
@@ -8,7 +8,16 @@ module Api
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def current_dir
|
11
|
-
|
11
|
+
File.join(*dirs)
|
12
|
+
end
|
13
|
+
|
14
|
+
def cd(dir)
|
15
|
+
dirs << dir
|
16
|
+
raise "#{current_dir} is not a directory." unless File.directory?(current_dir)
|
17
|
+
end
|
18
|
+
|
19
|
+
def dirs
|
20
|
+
@dirs ||= ['tmp/aruba']
|
12
21
|
end
|
13
22
|
|
14
23
|
def create_file(file_name, file_content)
|
data/lib/aruba/cucumber.rb
CHANGED