Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: rspec/rspec-core
base: v2.99.0.rc1
...
head fork: rspec/rspec-core
compare: v2.99.0
  • 7 commits
  • 5 files changed
  • 0 commit comments
  • 4 contributors
11 Changelog.md
View
@@ -1,3 +1,14 @@
+### 2.99.0 / 2014-06-01
+[Full Changelog](http://github.com/rspec/rspec-core/compare/v2.99.0.rc1...v2.99.0)
+
+Bug Fixes:
+
+* Fix `BaseTextFormatter` so that it does not re-close a closed output
+ stream. (Myron Marston)
+* Use `RSpec::Configuration#backtrace_exclusion_patterns` rather than the
+ deprecated `RSpec::Configuration#backtrace_clean_patterns` when mocking
+ with rr. (David Dollar)
+
### 2.99.0.rc1 / 2014-05-18
[Full Changelog](http://github.com/rspec/rspec-core/compare/v2.99.0.beta2...v2.99.0.rc1)
5 lib/rspec/core/formatters/base_text_formatter.rb
View
@@ -162,7 +162,10 @@ def seed(number)
end
def close
- output.close if IO === output && output != $stdout
+ return unless IO === output
+ return if output.closed? || output == $stdout
+
+ output.close
end
def self.const_missing(name)
2  lib/rspec/core/mocking/with_rr.rb
View
@@ -1,6 +1,6 @@
require 'rr'
-RSpec.configuration.backtrace_clean_patterns.push(RR::Errors::BACKTRACE_IDENTIFIER)
+RSpec.configuration.backtrace_exclusion_patterns.push(RR::Errors::BACKTRACE_IDENTIFIER)
module RSpec
module Core
2  lib/rspec/core/version.rb
View
@@ -1,7 +1,7 @@
module RSpec
module Core
module Version
- STRING = '2.99.0.rc1'
+ STRING = '2.99.0'
end
end
end
10 spec/rspec/core/formatters/base_text_formatter_spec.rb
View
@@ -5,6 +5,16 @@
let(:output) { StringIO.new }
let(:formatter) { RSpec::Core::Formatters::BaseTextFormatter.new(output) }
+ context "when closing the formatter", :isolated_directory => true do
+ it 'does not close an already closed output stream' do
+ output = File.new("./output_to_close", "w")
+ formatter = described_class.new(output)
+ output.close
+
+ expect { formatter.close }.not_to raise_error
+ end
+ end
+
describe "#summary_line" do
it "with 0s outputs pluralized (excluding pending)" do
expect(formatter.summary_line(0,0,0)).to eq("0 examples, 0 failures")

No commit comments for this range

Something went wrong with that request. Please try again.