rspec 1.1.7 → 1.1.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,10 @@
1
+ === Version 1.1.8 / 2008-10-03
2
+
3
+ * 2 bug fixes
4
+
5
+ * restore colorized output in linux and windows w/ autotest (Tim Pope). Fixes #413.
6
+ * autospec no longer hangs on windows. Fixes #554.
7
+
1
8
  === Version 1.1.7 / 2008-10-02
2
9
 
3
10
  * no changes since 1.1.6, but releasing rspec-1.1.7 to align versions with rspec-rails-1.1.7
@@ -1,3 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- ENV['RSPEC'] = 'true'
3
- system("autotest", *ARGV)
2
+ ENV['RSPEC'] = 'true' # allows autotest to discover rspec
3
+ ENV['AUTOTEST'] = 'true' # allows autotest to run w/ color on linux
4
+ system (RUBY_PLATFORM =~ /mswin/ ? 'autotest.bat' : 'autotest'), *ARGV
@@ -45,7 +45,10 @@ module Test
45
45
 
46
46
  def initialize(defined_description, &implementation)
47
47
  @_defined_description = defined_description
48
- @_implementation = implementation
48
+
49
+ # TODO - examples fail in rspec-rails if we remove "|| pending_implementation"
50
+ # - find a way to fail without it in rspec's code examples
51
+ @_implementation = implementation || pending_implementation
49
52
 
50
53
  @_result = ::Test::Unit::TestResult.new
51
54
  # @method_name is important to set here because it "complies" with Test::Unit's interface.
@@ -56,6 +59,13 @@ module Test
56
59
  def run(ignore_this_argument=nil)
57
60
  super()
58
61
  end
62
+
63
+ private
64
+
65
+ def pending_implementation
66
+ error = Spec::Example::NotYetImplementedError.new(caller)
67
+ lambda { raise(error) }
68
+ end
59
69
  end
60
70
  end
61
71
  end
@@ -107,7 +107,7 @@ module Spec
107
107
  # A message to print to stderr when there are failures.
108
108
  attr_accessor :failure_message
109
109
 
110
- # Where RSpec's output is written. Defaults to STDOUT.
110
+ # Where RSpec's output is written. Defaults to $stdout.
111
111
  # DEPRECATED. Use --format FORMAT:WHERE in spec_opts.
112
112
  attr_accessor :out
113
113
 
@@ -199,7 +199,7 @@ module Spec
199
199
 
200
200
  def options # :nodoc:
201
201
  @options ||= begin
202
- parser = ::Spec::Runner::OptionParser.new(STDERR, STDOUT)
202
+ parser = ::Spec::Runner::OptionParser.new($stderr, $stdout)
203
203
  parser.order!(ARGV)
204
204
  parser.options
205
205
  end
@@ -77,7 +77,7 @@ module Spec
77
77
  end
78
78
 
79
79
  def close
80
- if IO === @output && @output != STDOUT
80
+ if IO === @output && @output != $stdout
81
81
  @output.close
82
82
  end
83
83
  end
@@ -38,7 +38,7 @@ module Spec
38
38
  "(does not work for dynamically generated specs)"],
39
39
  :format => ["-f", "--format FORMAT[:WHERE]","Specifies what format to use for output. Specify WHERE to tell",
40
40
  "the formatter where to write the output. All built-in formats",
41
- "expect WHERE to be a file name, and will write to STDOUT if it's",
41
+ "expect WHERE to be a file name, and will write to $stdout if it's",
42
42
  "not specified. The --format option may be specified several times",
43
43
  "if you want several outputs",
44
44
  " ",
@@ -136,8 +136,10 @@ module Spec
136
136
  @colour = colour
137
137
  if @colour && RUBY_PLATFORM =~ /mswin|mingw/ ;\
138
138
  begin ;\
139
+ replace_output = @output_stream.equal?($stdout) ;\
139
140
  require 'rubygems' ;\
140
141
  require 'Win32/Console/ANSI' ;\
142
+ @output_stream = $stdout if replace_output ;\
141
143
  rescue LoadError ;\
142
144
  warn "You must 'gem install win32console' to use colour on Windows" ;\
143
145
  @colour = false ;\
@@ -3,7 +3,7 @@ module Spec
3
3
  unless defined? MAJOR
4
4
  MAJOR = 1
5
5
  MINOR = 1
6
- TINY = 7
6
+ TINY = 8
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
 
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{rspec}
3
- s.version = "1.1.6"
3
+ s.version = "1.1.8"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
6
  s.authors = ["RSpec Development Team"]
7
- s.date = %q{2008-10-02}
7
+ s.date = %q{2008-10-03}
8
8
  s.description = %q{Behaviour Driven Development for Ruby.}
9
9
  s.email = ["rspec-devel@rubyforge.org"]
10
10
  s.executables = ["autospec", "spec"]
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = %q{rspec}
18
18
  s.rubygems_version = %q{1.3.0}
19
- s.summary = %q{rspec 1.1.6}
19
+ s.summary = %q{rspec 1.1.8}
20
20
 
21
21
  if s.respond_to? :specification_version then
22
22
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
@@ -42,4 +42,8 @@ describe "Test::Unit::TestCase" do
42
42
  $?.should == 256
43
43
  end
44
44
  end
45
+
46
+ describe "not yet implemented examples:" do
47
+ it "this example should be reported as pending (not an error)"
48
+ end
45
49
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.1.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: 2008-10-02 00:00:00 -05:00
12
+ date: 2008-10-03 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -472,6 +472,6 @@ rubyforge_project: rspec
472
472
  rubygems_version: 1.3.0
473
473
  signing_key:
474
474
  specification_version: 2
475
- summary: rspec 1.1.7
475
+ summary: rspec 1.1.8
476
476
  test_files: []
477
477