spork-local_process 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.0.6 - 2011/09/30
2
+ * allow to rerun specs with the same additional options
3
+
1
4
  == 0.0.5 - 2011/09/30
2
5
  * fix testrun loop
3
6
 
@@ -16,7 +16,7 @@ class Spork::TestFramework::RSpec < Spork::TestFramework
16
16
 
17
17
  def options_str options, additional_options=nil
18
18
  str = options.is_a?(Array) ? options.join(" ") : options
19
- str.gsub!("\\", "/")
19
+ str = str.gsub("\\", "/")
20
20
  str << " \"#{additional_options}\"" if additional_options
21
21
  str
22
22
  end
@@ -44,6 +44,17 @@ describe Spork::RunStrategy::LocalProcess do
44
44
  Spork::RunStrategy::LocalProcess.new(test_framework).run(["some_specs"], STDERR, STDOUT)
45
45
  end
46
46
 
47
+ it "allows to rerun specs with the same additional options" do
48
+ test_framework = mock_test_framework "other_specs", 3
49
+ test_framework.should_receive(:run_tests).with(["other_specs"], STDERR, STDOUT).exactly(2).times
50
+ test_framework.should_receive(:additional_options=).with(%q[some additional opts]).exactly(2).times
51
+ test_framework.should_receive(:options_str).with("other_specs", "some additional opts").exactly(2).times.and_return(%q[other_specs "some additional opts"])
52
+
53
+ Readline.should_receive(:readline).with("> 'some_specs' or: ").and_return(%Q[other_specs "some additional opts"\n])
54
+ Readline.should_receive(:readline).exactly(2).times.with(%Q[> 'other_specs "some additional opts"' or: ]).and_return("\n")
55
+ Spork::RunStrategy::LocalProcess.new(test_framework).run(["some_specs"], STDERR, STDOUT)
56
+ end
57
+
47
58
  it "exits the process if 'exit' is specified as a filter" do
48
59
  test_framework = mock_test_framework
49
60
 
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "spork-local_process"
6
- s.version = "0.0.5"
6
+ s.version = "0.0.6"
7
7
  s.authors = ["Jarmo Pertman"]
8
8
  s.email = ["jarmo.p@gmail.com"]
9
9
  s.homepage = "https://github.com/jarmo/spork-local_process"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spork-local_process
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jarmo Pertman