Permalink
Browse files

remove erroneously passing example

  • Loading branch information...
1 parent ff4df6b commit 7e22b36061f7eb40fd75430564d9c4cadba4f070 @dchelimsky dchelimsky committed Apr 24, 2010
Showing with 0 additions and 35 deletions.
  1. +0 −27 spec/rspec/core/mocha_spec.rb
  2. +0 −8 spec/spec_helper.rb
View
27 spec/rspec/core/mocha_spec.rb
@@ -1,27 +0,0 @@
-require 'spec_helper'
-
-describe "Mocha Regression involving double reporting of errors" do
-
- it "should not double report mocha errors" do
- # The below example should have one error, not two
- # I'm also not sure how to test this regression without having the failure counting by
- # the running Rspec::Core instance
- formatter = Rspec::Core::Formatters::BaseFormatter.new
-
- use_formatter(formatter) do
-
- group = Rspec::Core::ExampleGroup.describe("my favorite pony") do
- example("showing a double fail") do
- foo = "string"
- foo.expects(:something)
- end
- end
- group.examples_to_run.replace(group.examples)
- group.run(formatter)
-
- end
-
- formatter.examples.size.should == 1
- end
-
-end
View
8 spec/spec_helper.rb
@@ -38,14 +38,6 @@ def self.run_all(reporter=nil)
end
end
-def use_formatter(new_formatter)
- original_formatter = Rspec.configuration.formatter
- Rspec.configuration.instance_variable_set(:@formatter, new_formatter)
- yield
-ensure
- Rspec.configuration.instance_variable_set(:@formatter, original_formatter)
-end
-
def in_editor?
ENV.has_key?('TM_MODE') || ENV.has_key?('EMACS') || ENV.has_key?('VIM')
end

0 comments on commit 7e22b36

Please sign in to comment.