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 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
- unless Spec::Ruby.version.to_f == 1.9
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
- #Supports Heckle 1.2 and prior (earlier versions used Heckle::Base)
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
- success = @rspec_options.run_examples
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",
@@ -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
@@ -4,7 +4,7 @@ module Spec
4
4
  MAJOR = 1
5
5
  MINOR = 1
6
6
  TINY = 99
7
- MINESCULE = 7
7
+ MINESCULE = 8
8
8
 
9
9
 
10
10
  STRING = [MAJOR, MINOR, TINY, MINESCULE].compact.join('.')
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.7"
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-18}
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.7}
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
@@ -1,4 +1,4 @@
1
- unless Spec::Ruby.version.to_f == 1.9
1
+ if Spec::Ruby.version.to_f < 1.9
2
2
  require File.dirname(__FILE__) + '/../../spec_helper.rb'
3
3
  unless [/mswin/, /java/].detect{|p| p =~ RUBY_PLATFORM}
4
4
  require 'spec/runner/heckle_runner'
@@ -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.7
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-18 00:00:00 -08:00
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.7
419
+ summary: rspec 1.1.99.8
420
420
  test_files: []
421
421