hydra 0.16.4 → 0.16.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.16.4
1
+ 0.16.5
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{hydra}
8
- s.version = "0.16.4"
8
+ s.version = "0.16.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nick Gauthier"]
12
- s.date = %q{2010-04-19}
12
+ s.date = %q{2010-04-20}
13
13
  s.description = %q{Spread your tests over multiple machines to test your code faster.}
14
14
  s.email = %q{nick@smartlogicsolutions.com}
15
15
  s.extra_rdoc_files = [
@@ -64,6 +64,7 @@ Gem::Specification.new do |s|
64
64
  "test/fixtures/write_file.rb",
65
65
  "test/fixtures/write_file_alternate_spec.rb",
66
66
  "test/fixtures/write_file_spec.rb",
67
+ "test/fixtures/write_file_with_pending_spec.rb",
67
68
  "test/master_test.rb",
68
69
  "test/message_test.rb",
69
70
  "test/pipe_test.rb",
@@ -87,6 +88,7 @@ Gem::Specification.new do |s|
87
88
  "test/fixtures/assert_true.rb",
88
89
  "test/fixtures/slow.rb",
89
90
  "test/fixtures/write_file_spec.rb",
91
+ "test/fixtures/write_file_with_pending_spec.rb",
90
92
  "test/fixtures/write_file.rb",
91
93
  "test/message_test.rb",
92
94
  "test/test_helper.rb",
@@ -6,6 +6,10 @@ module Spec
6
6
  # Stifle the post-test summary
7
7
  def dump_summary(duration, example, failure, pending)
8
8
  end
9
+
10
+ # Stifle the output of pending examples
11
+ def example_pending(*args)
12
+ end
9
13
  end
10
14
  end
11
15
  end
@@ -0,0 +1,11 @@
1
+ require 'tmpdir'
2
+ require 'spec'
3
+ context "file writing" do
4
+ it "writes to a file" do
5
+ File.open(File.join(Dir.tmpdir, 'hydra_test.txt'), 'a') do |f|
6
+ f.write "HYDRA"
7
+ end
8
+ end
9
+ it 'could do so much more' # pending spec
10
+ end
11
+
@@ -20,6 +20,17 @@ class MasterTest < Test::Unit::TestCase
20
20
  assert_equal "HYDRA", File.read(target_file)
21
21
  end
22
22
 
23
+ should "run a spec with pending examples" do
24
+ progress_bar = Hydra::Listener::ProgressBar.new(StringIO.new)
25
+ Hydra::Master.new(
26
+ :files => [rspec_file_with_pending],
27
+ :listeners => [progress_bar]
28
+ )
29
+ assert File.exists?(target_file)
30
+ assert_equal "HYDRA", File.read(target_file)
31
+ assert_equal false, progress_bar.instance_variable_get('@errors')
32
+ end
33
+
23
34
  should "generate a report" do
24
35
  Hydra::Master.new(:files => [test_file])
25
36
  assert File.exists?(target_file)
@@ -51,6 +51,18 @@ class RunnerTest < Test::Unit::TestCase
51
51
  assert !File.exists?(target_file)
52
52
  end
53
53
 
54
+ should "run rspec tests with pending examples" do
55
+ runner = Hydra::Runner.new(:io => File.new('/dev/null', 'w'))
56
+ assert File.exists?(rspec_file_with_pending)
57
+
58
+ runner.run_file(rspec_file_with_pending)
59
+
60
+ assert File.exists?(target_file)
61
+ assert_equal "HYDRA", File.read(target_file)
62
+
63
+ FileUtils.rm_f(target_file)
64
+ end
65
+
54
66
  should "run two cucumber tests" do
55
67
  # because of all the crap cucumber pulls in
56
68
  # we run this in a fork to not contaminate
@@ -31,6 +31,10 @@ class Test::Unit::TestCase
31
31
  File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', 'write_file_alternate_spec.rb'))
32
32
  end
33
33
 
34
+ def rspec_file_with_pending
35
+ File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', 'write_file_with_pending_spec.rb'))
36
+ end
37
+
34
38
  def cucumber_feature_file
35
39
  File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', 'features', 'write_file.feature'))
36
40
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 16
8
- - 4
9
- version: 0.16.4
8
+ - 5
9
+ version: 0.16.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nick Gauthier
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-19 00:00:00 -04:00
17
+ date: 2010-04-20 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -116,6 +116,7 @@ files:
116
116
  - test/fixtures/write_file.rb
117
117
  - test/fixtures/write_file_alternate_spec.rb
118
118
  - test/fixtures/write_file_spec.rb
119
+ - test/fixtures/write_file_with_pending_spec.rb
119
120
  - test/master_test.rb
120
121
  - test/message_test.rb
121
122
  - test/pipe_test.rb
@@ -163,6 +164,7 @@ test_files:
163
164
  - test/fixtures/assert_true.rb
164
165
  - test/fixtures/slow.rb
165
166
  - test/fixtures/write_file_spec.rb
167
+ - test/fixtures/write_file_with_pending_spec.rb
166
168
  - test/fixtures/write_file.rb
167
169
  - test/message_test.rb
168
170
  - test/test_helper.rb