dchelimsky-rspec 1.1.99.7 → 1.1.99.8
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +2 -0
- data/features/heckle/heckle.feature +4 -1
- data/lib/spec/runner/heckle_runner.rb +3 -5
- data/lib/spec/runner/option_parser.rb +1 -1
- data/lib/spec/runner/options.rb +3 -0
- data/lib/spec/version.rb +1 -1
- data/rspec.gemspec +3 -3
- data/spec/spec/runner/heckler_spec.rb +1 -1
- data/spec/spec/runner/option_parser_spec.rb +10 -0
- metadata +3 -3
data/History.txt
CHANGED
@@ -21,6 +21,7 @@ WARNINGS:
|
|
21
21
|
|
22
22
|
* enhancements
|
23
23
|
|
24
|
+
* cleaner integration with with heckle-1.4.2
|
24
25
|
* allow registering example groups with a path-like key (Pat Maddox)
|
25
26
|
* start DRb service at "druby://localhost:0" (Hongli Lai) - See http://redmine.ruby-lang.org/issues/show/496
|
26
27
|
* consistent reporting of errors as failures
|
@@ -29,6 +30,7 @@ WARNINGS:
|
|
29
30
|
* added handling for does_not_match? for matchers that want to know the context in which they were called
|
30
31
|
* lots of ruby 1.9.1 compatibility fixes from Chad Humprhies
|
31
32
|
* improved feedback from be_kind_of/be_a_kind_of/be_instance_of/be_an_instance_of (Jakub Šťastný)
|
33
|
+
* added --silent (-l) formatter option, which is now the default when running --heckle (Bob Aman)
|
32
34
|
|
33
35
|
* bug fixes
|
34
36
|
|
@@ -25,6 +25,7 @@ Feature: heckle a class
|
|
25
25
|
"""
|
26
26
|
When I run it with the spec command --heckle Thing
|
27
27
|
Then the stdout should match "The following mutations didn't cause test failures:"
|
28
|
+
But the stdout should not match "FAILED"
|
28
29
|
|
29
30
|
Scenario: Heckle does not find a problem
|
30
31
|
Given the following spec:
|
@@ -50,4 +51,6 @@ Feature: heckle a class
|
|
50
51
|
end
|
51
52
|
"""
|
52
53
|
When I run it with the spec command --heckle Thing
|
53
|
-
Then the stdout should match "No mutants survived"
|
54
|
+
Then the stdout should match "No mutants survived"
|
55
|
+
But the stdout should not match "FAILED"
|
56
|
+
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
if Spec::Ruby.version.to_f < 1.9
|
2
2
|
begin
|
3
3
|
require 'rubygems'
|
4
4
|
require 'heckle'
|
@@ -56,16 +56,14 @@ unless Spec::Ruby.version.to_f == 1.9
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
|
60
|
-
class Heckler < (Heckle.const_defined?(:Base) ? Heckle::Base : Heckle)
|
59
|
+
class Heckler < Heckle
|
61
60
|
def initialize(klass_name, method_name, rspec_options)
|
62
61
|
super(klass_name, method_name)
|
63
62
|
@rspec_options = rspec_options
|
64
63
|
end
|
65
64
|
|
66
65
|
def tests_pass?
|
67
|
-
|
68
|
-
success
|
66
|
+
@rspec_options.run_examples
|
69
67
|
end
|
70
68
|
|
71
69
|
end
|
@@ -47,7 +47,7 @@ module Spec
|
|
47
47
|
"if you want several outputs",
|
48
48
|
" ",
|
49
49
|
"Builtin formats:",
|
50
|
-
"progress|p : Text-based progress bar",
|
50
|
+
"silent|l : No output", "progress|p : Text-based progress bar",
|
51
51
|
"profile|o : Text-based progress bar with profiling of 10 slowest examples",
|
52
52
|
"specdoc|s : Code example doc strings",
|
53
53
|
"nested|n : Code example doc strings with nested groups intented",
|
data/lib/spec/runner/options.rb
CHANGED
@@ -6,6 +6,8 @@ module Spec
|
|
6
6
|
}
|
7
7
|
|
8
8
|
EXAMPLE_FORMATTERS = { # Load these lazily for better speed
|
9
|
+
'silent' => ['spec/runner/formatter/base_formatter', 'Formatter::BaseFormatter'],
|
10
|
+
'l' => ['spec/runner/formatter/base_formatter', 'Formatter::BaseFormatter'],
|
9
11
|
'specdoc' => ['spec/runner/formatter/specdoc_formatter', 'Formatter::SpecdocFormatter'],
|
10
12
|
's' => ['spec/runner/formatter/specdoc_formatter', 'Formatter::SpecdocFormatter'],
|
11
13
|
'nested' => ['spec/runner/formatter/nested_text_formatter', 'Formatter::NestedTextFormatter'],
|
@@ -201,6 +203,7 @@ module Spec
|
|
201
203
|
end
|
202
204
|
|
203
205
|
def load_heckle_runner(heckle)
|
206
|
+
@format_options ||= [['silent', @output_stream]]
|
204
207
|
suffix = ([/mswin/, /java/].detect{|p| p =~ RUBY_PLATFORM} || Spec::Ruby.version.to_f == 1.9) ? '_unsupported' : ''
|
205
208
|
require "spec/runner/heckle_runner#{suffix}"
|
206
209
|
@heckle_runner = ::Spec::Runner::HeckleRunner.new(heckle)
|
data/lib/spec/version.rb
CHANGED
data/rspec.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{rspec}
|
5
|
-
s.version = "1.1.99.
|
5
|
+
s.version = "1.1.99.8"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["RSpec Development Team"]
|
9
|
-
s.date = %q{2009-02-
|
9
|
+
s.date = %q{2009-02-23}
|
10
10
|
s.description = %q{Behaviour Driven Development for Ruby.}
|
11
11
|
s.email = ["rspec-devel@rubyforge.org"]
|
12
12
|
s.executables = ["autospec", "spec"]
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.require_paths = ["lib"]
|
19
19
|
s.rubyforge_project = %q{rspec}
|
20
20
|
s.rubygems_version = %q{1.3.1}
|
21
|
-
s.summary = %q{rspec 1.1.99.
|
21
|
+
s.summary = %q{rspec 1.1.99.8}
|
22
22
|
|
23
23
|
if s.respond_to? :specification_version then
|
24
24
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
@@ -149,6 +149,16 @@ describe "OptionParser" do
|
|
149
149
|
options.formatters[0].class.should equal(Spec::Runner::Formatter::HtmlFormatter)
|
150
150
|
end
|
151
151
|
|
152
|
+
it "should use base formatter when format is s" do
|
153
|
+
options = parse(["--format", "l"])
|
154
|
+
options.formatters[0].class.should equal(Spec::Runner::Formatter::BaseFormatter)
|
155
|
+
end
|
156
|
+
|
157
|
+
it "should use base formatter when format is silent" do
|
158
|
+
options = parse(["--format", "silent"])
|
159
|
+
options.formatters[0].class.should equal(Spec::Runner::Formatter::BaseFormatter)
|
160
|
+
end
|
161
|
+
|
152
162
|
it "should use html formatter with explicit output when format is html:test.html" do
|
153
163
|
FileUtils.rm 'test.html' if File.exist?('test.html')
|
154
164
|
options = parse(["--format", "html:test.html"])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dchelimsky-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.99.
|
4
|
+
version: 1.1.99.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RSpec Development Team
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-02-
|
12
|
+
date: 2009-02-23 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -416,6 +416,6 @@ rubyforge_project: rspec
|
|
416
416
|
rubygems_version: 1.2.0
|
417
417
|
signing_key:
|
418
418
|
specification_version: 2
|
419
|
-
summary: rspec 1.1.99.
|
419
|
+
summary: rspec 1.1.99.8
|
420
420
|
test_files: []
|
421
421
|
|