<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,15 @@
+== 1.5.1
+
+- Fix silly load-path error that some had been seeing
+
+== 1.5
+
+- Support for RSpec 1.1.1 example groups (which broke ci_reporter 1.4)
+- Change internal model to delegation instead of inheritance, allowing ci_reporter to wrap different output formatters
+- Add 'ci:setup:rspecdoc' task to output specdoc format instead of progress
+- Add support for pending examples; they will be listed in the report XML as successful, but the name will have a '(PENDING)' tag appended
+- Support for RSpec &lt; 0.9 removed as promised; use 1.4 if you still need to use an older version of RSpec
+
 == 1.4
 
 - Test::Unit tests that fail in multiple places (setup, test method, and teardown) are now tracked (marcog)</diff>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <diff>@@ -30,11 +30,15 @@ end
 # !@#$ no easy way to empty the default list of prerequisites
 Rake::Task['default'].send :instance_variable_set, &quot;@prerequisites&quot;, FileList[]
 
-task :default =&gt; :rcov
+# No RCov on JRuby at the moment
+if RUBY_PLATFORM =~ /java/
+  task :default =&gt; :spec
+else
+  task :default =&gt; :rcov
+end
 
 Spec::Rake::SpecTask.new do |t|
-  t.spec_opts ||= []
-  t.spec_opts &lt;&lt; &quot;--diff&quot; &lt;&lt; &quot;unified&quot;
+  t.spec_opts = [&quot;--diff&quot;, &quot;unified&quot;]
 end
 
 Spec::Rake::SpecTask.new(&quot;spec:rcov&quot;) do |t|
@@ -44,7 +48,7 @@ end
 RCov::VerifyTask.new(:rcov) do |t|
   # Can't get threshold up to 100 until the RSpec &lt; 1.0 compatibility
   # code is dropped
-  t.threshold = 97
+  t.threshold = 99
   t.require_exact_threshold = false
 end
 task &quot;spec:rcov&quot; do
@@ -53,6 +57,7 @@ end
 task :rcov =&gt; &quot;spec:rcov&quot;
 
 task :generate_output do
+  rm_f &quot;acceptance/reports/*.xml&quot;
   ENV['CI_REPORTS'] = &quot;acceptance/reports&quot;
   begin
     `ruby -Ilib acceptance/test_unit_example_test.rb` rescue nil</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -7,4 +7,12 @@ describe &quot;RSpec example&quot; do
   it &quot;should fail&quot; do
     violated
   end
+
+  it &quot;should be pending&quot;
+
+  describe &quot;nested&quot; do
+    it &quot;should succeed&quot; do
+      true.should be_true
+    end
+  end
 end</diff>
      <filename>acceptance/rspec_example_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -34,8 +34,9 @@ describe &quot;Test::Unit acceptance&quot; do
 end
 
 describe &quot;RSpec acceptance&quot; do
-  it &quot;should generate one XML file&quot; do
+  it &quot;should generate two XML files&quot; do
     File.exist?(File.join(REPORTS_DIR, 'SPEC-RSpec-example.xml')).should == true
+    File.exist?(File.join(REPORTS_DIR, 'SPEC-RSpec-example-nested.xml')).should == true
   end
 
   it &quot;should have two tests and one failure&quot; do
@@ -44,10 +45,20 @@ describe &quot;RSpec acceptance&quot; do
     end
     doc.root.attributes[&quot;errors&quot;].should == &quot;0&quot;
     doc.root.attributes[&quot;failures&quot;].should == &quot;1&quot;
-    doc.root.attributes[&quot;tests&quot;].should == &quot;2&quot;
-    doc.root.elements.to_a(&quot;/testsuite/testcase&quot;).size.should == 2
+    doc.root.attributes[&quot;tests&quot;].should == &quot;3&quot;
+    doc.root.elements.to_a(&quot;/testsuite/testcase&quot;).size.should == 3
     failures = doc.root.elements.to_a(&quot;/testsuite/testcase/failure&quot;)
     failures.size.should == 1
     failures.first.attributes[&quot;type&quot;].should == &quot;Spec::Expectations::ExpectationNotMetError&quot;
   end
+
+  it &quot;should have one test in the nested example report&quot; do
+    doc = File.open(File.join(REPORTS_DIR, 'SPEC-RSpec-example-nested.xml')) do |f|
+      REXML::Document.new(f)
+    end
+    doc.root.attributes[&quot;errors&quot;].should == &quot;0&quot;
+    doc.root.attributes[&quot;failures&quot;].should == &quot;0&quot;
+    doc.root.attributes[&quot;tests&quot;].should == &quot;1&quot;
+    doc.root.elements.to_a(&quot;/testsuite/testcase&quot;).size.should == 1
+  end
 end</diff>
      <filename>acceptance/verification_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,13 +4,20 @@
 
 namespace :ci do
   namespace :setup do
-    task :rspec do
+    task :spec_report_cleanup do
       rm_rf ENV[&quot;CI_REPORTS&quot;] || &quot;spec/reports&quot;
+    end
+
+    task :rspec =&gt; :spec_report_cleanup do
       spec_opts = [&quot;--require&quot;, &quot;#{File.dirname(__FILE__)}/rspec_loader.rb&quot;,
         &quot;--format&quot;, &quot;CI::Reporter::RSpec&quot;].join(&quot; &quot;)
       ENV[&quot;SPEC_OPTS&quot;] = &quot;#{ENV['SPEC_OPTS']} #{spec_opts}&quot;
-      # Pre RSpec 1.0.6
-      ENV[&quot;RSPECOPTS&quot;] = &quot;#{ENV['RSPECOPTS']} #{spec_opts}&quot;
+    end
+
+    task :rspecdoc =&gt; :spec_report_cleanup do
+      spec_opts = [&quot;--require&quot;, &quot;#{File.dirname(__FILE__)}/rspec_loader.rb&quot;,
+        &quot;--format&quot;, &quot;CI::Reporter::RSpecDoc&quot;].join(&quot; &quot;)
+      ENV[&quot;SPEC_OPTS&quot;] = &quot;#{ENV['SPEC_OPTS']} #{spec_opts}&quot;
     end
   end
 end</diff>
      <filename>lib/ci/reporter/rake/rspec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,5 +2,5 @@
 # See the file LICENSE.txt included with the distribution for
 # software license details.
 
-$: &lt;&lt; File.dirname(__FILE__) + &quot;/../../../lib&quot;
+$: &lt;&lt; File.dirname(__FILE__) + &quot;/../../..&quot;
 require 'ci/reporter/rspec'
\ No newline at end of file</diff>
      <filename>lib/ci/reporter/rake/rspec_loader.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@
 # See the file LICENSE.txt included with the distribution for
 # software license details.
 
-$: &lt;&lt; File.dirname(__FILE__) + &quot;/../../../lib&quot;
+$: &lt;&lt; File.dirname(__FILE__) + &quot;/../../..&quot;
 require 'ci/reporter/test_unit'
 
 module Test #:nodoc:all</diff>
      <filename>lib/ci/reporter/rake/test_unit_loader.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,13 +3,19 @@
 # software license details.
 
 require 'ci/reporter/core'
+tried_gem = false
 begin
-  gem 'rspec'
-rescue Gem::LoadError
-  # Needed for non-gem RSpec (e.g., reporting on RSpec's own specs);
-  # if spec isn't found, the next require will blow up
+  require 'spec'
+  require 'spec/runner/formatter/progress_bar_formatter'
+  require 'spec/runner/formatter/specdoc_formatter'
+rescue LoadError
+  unless tried_gem
+    tried_gem = true
+    require 'rubygems'
+    gem 'rspec'
+    retry
+  end
 end
-require 'spec'
 
 module CI
   module Reporter
@@ -33,101 +39,78 @@ module CI
     end
 
     # Custom +RSpec+ formatter used to hook into the spec runs and capture results.
-    class RSpec &lt; Spec::Runner::Formatter::ProgressBarFormatter
-      def initialize(output, dry_run=false, colour=false, report_mgr=nil)
-        if respond_to? :dry_run=
-          super(output)
-          self.dry_run=dry_run
-          self.colour=colour
-        else
-          super(output, dry_run, colour)
-        end
-        @report_manager = report_mgr || ReportManager.new(&quot;spec&quot;)
+    class RSpec &lt; Spec::Runner::Formatter::BaseFormatter
+      attr_accessor :report_manager
+      attr_accessor :formatter
+      def initialize(*args)
+        super
+        @formatter ||= Spec::Runner::Formatter::ProgressBarFormatter.new(*args)
+        @report_manager = ReportManager.new(&quot;spec&quot;)
         @suite = nil
       end
 
-      def deprecated
-        unless @warned
-          require 'ci/reporter/version'
-          warn &quot;warning: use of RSpec &lt; 0.9 with CI::Reporter #{CI::Reporter::VERSION} is deprecated;&quot;
-          warn &quot;a future version will not be compatible.&quot;
-        end
-        @warned = true
-      end
-
       def start(spec_count)
-        super
+        @formatter.start(spec_count)
       end
 
-      # Pre-0.9 hook
-      def add_context(name, first)
-        super
-        deprecated
-        new_suite(name)
-      end
-
-      # Post-0.9 hook
       def add_behaviour(name)
-        super
+        @formatter.add_behaviour(name)
         new_suite(name)
       end
 
-      # Pre-0.9 hook
-      def spec_started(name)
-        super
-        deprecated
-        case_started(name)
+      def add_example_group(example_group)
+        @formatter.add_example_group(example_group)
+        new_suite(example_group.description)
       end
 
-      # Post-0.9 hook
       def example_started(name)
-        super
-        case_started(name)
-      end
-
-      # Pre-0.9 hook
-      def spec_failed(name, counter, failure)
-        super
-        deprecated
-        case_failed(name, counter, failure)
+        @formatter.example_started(name)
+        spec = TestCase.new name
+        @suite.testcases &lt;&lt; spec
+        spec.start
       end
 
-      # Post-0.9 hook
       def example_failed(name, counter, failure)
-        super
-        case_failed(name, counter, failure)
+        @formatter.example_failed(name, counter, failure)
+        spec = @suite.testcases.last
+        spec.finish
+        spec.failures &lt;&lt; RSpecFailure.new(failure)
       end
 
-      # Pre-0.9 hook
-      def spec_passed(name)
-        super
-        deprecated
-        case_passed(name)
+      def example_passed(name)
+        @formatter.example_passed(name)
+        spec = @suite.testcases.last
+        spec.finish
       end
 
-      # Post-0.9 hook
-      def example_passed(name)
-        super
-        case_passed(name)
+      def example_pending(*args)
+        @formatter.example_pending(*args)
+        spec = @suite.testcases.last
+        spec.finish
+        spec.name = &quot;#{spec.name} (PENDING)&quot;
       end
 
       def start_dump
-        super
+        @formatter.start_dump
       end
 
-      def dump_failure(counter, failure)
-        super
+      def dump_failure(*args)
+        @formatter.dump_failure(*args)
       end
 
-      def dump_summary(duration, example_count, failure_count, not_implemented_count = 0)
-        begin
-          super
-        rescue ArgumentError
-          super(duration, example_count, failure_count)
-        end
+      def dump_summary(*args)
+        @formatter.dump_summary(*args)
         write_report
       end
 
+      def dump_pending
+        @formatter.dump_pending
+      end
+
+      def close
+        @formatter.close
+      end
+
       private
       def write_report
         @suite.finish
@@ -139,22 +122,12 @@ module CI
         @suite = TestSuite.new name
         @suite.start
       end
+    end
 
-      def case_started(name)
-        spec = TestCase.new name
-        @suite.testcases &lt;&lt; spec
-        spec.start
-      end
-
-      def case_failed(name, counter, failure)
-        spec = @suite.testcases.last
-        spec.finish
-        spec.failures &lt;&lt; RSpecFailure.new(failure)
-      end
-
-      def case_passed(name)
-        spec = @suite.testcases.last
-        spec.finish
+    class RSpecDoc &lt; RSpec
+      def initialize(*args)
+        @formatter = Spec::Runner::Formatter::SpecdocFormatter.new(*args)
+        super
       end
     end
   end</diff>
      <filename>lib/ci/reporter/rspec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 module CI
   module Reporter
-    VERSION = &quot;1.4&quot;
+    VERSION = &quot;1.5.1&quot;
   end
 end
\ No newline at end of file</diff>
      <filename>lib/ci/reporter/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -59,6 +59,11 @@ describe &quot;ci_reporter ci:setup:rspec task&quot; do
     @rake[&quot;ci:setup:rspec&quot;].invoke
     ENV[&quot;SPEC_OPTS&quot;].should =~ /--require.*rspec_loader.*--format.*CI::Reporter::RSpec/
   end
+
+  it &quot;should set ENV['SPEC_OPTS'] to include rspec doc formatter if task is ci:setup:rspecdoc&quot; do
+    @rake[&quot;ci:setup:rspecdoc&quot;].invoke
+    ENV[&quot;SPEC_OPTS&quot;].should =~ /--require.*rspec_loader.*--format.*CI::Reporter::RSpecDoc/
+  end
   
   it &quot;should append to ENV['SPEC_OPTS'] if it already contains a value&quot; do
     ENV[&quot;SPEC_OPTS&quot;] = &quot;somevalue&quot;.freeze</diff>
      <filename>spec/ci/reporter/rake/rake_tasks_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,30 +11,76 @@ describe &quot;The RSpec reporter&quot; do
     @error.stub!(:expectation_not_met?).and_return(false)
     @error.stub!(:pending_fixed?).and_return(false)
     @report_mgr = mock(&quot;report manager&quot;)
-    @fmt = CI::Reporter::RSpec.new(StringIO.new(&quot;&quot;), false, false, @report_mgr)
+    @options = mock(&quot;options&quot;)
+    @args = [@options, StringIO.new(&quot;&quot;)]
+    @args.shift if Spec::VERSION::MAJOR == 1 &amp;&amp; Spec::VERSION::MINOR &lt; 1
+    @fmt = CI::Reporter::RSpec.new *@args
+    @fmt.report_manager = @report_mgr
+    @formatter = mock(&quot;formatter&quot;)
+    @fmt.formatter = @formatter
   end
 
-  it &quot;should create a test suite with one success and one failure&quot; do
+  it &quot;should use a progress bar formatter by default&quot; do
+    fmt = CI::Reporter::RSpec.new *@args
+    fmt.formatter.should be_instance_of(Spec::Runner::Formatter::ProgressBarFormatter)
+  end
+
+  it &quot;should use a specdoc formatter for RSpecDoc&quot; do
+    fmt = CI::Reporter::RSpecDoc.new *@args
+    fmt.formatter.should be_instance_of(Spec::Runner::Formatter::SpecdocFormatter)
+  end
+
+  it &quot;should create a test suite with one success, one failure, and one pending&quot; do
     @report_mgr.should_receive(:write_report).and_return do |suite|
-      suite.testcases.length.should == 2
-      suite.testcases.first.should_not be_failure
-      suite.testcases.first.should_not be_error
-      suite.testcases.last.should be_error
+      suite.testcases.length.should == 3
+      suite.testcases[0].should_not be_failure
+      suite.testcases[0].should_not be_error
+      suite.testcases[1].should be_error
+      suite.testcases[2].name.should =~ /\(PENDING\)/
     end
 
-    @fmt.start(2)
-    @fmt.add_behaviour(&quot;A context&quot;)
+    example_group = mock &quot;example group&quot;
+    example_group.stub!(:description).and_return &quot;A context&quot;
+
+    @formatter.should_receive(:start).with(3)
+    @formatter.should_receive(:add_example_group).with(example_group)
+    @formatter.should_receive(:example_started).exactly(3).times
+    @formatter.should_receive(:example_passed).once
+    @formatter.should_receive(:example_failed).once
+    @formatter.should_receive(:example_pending).once
+    @formatter.should_receive(:start_dump).once
+    @formatter.should_receive(:dump_failure).once
+    @formatter.should_receive(:dump_summary).once
+    @formatter.should_receive(:dump_pending).once
+    @formatter.should_receive(:close).once
+
+    @fmt.start(3)
+    @fmt.add_example_group(example_group)
     @fmt.example_started(&quot;should pass&quot;)
     @fmt.example_passed(&quot;should pass&quot;)
     @fmt.example_started(&quot;should fail&quot;)
     @fmt.example_failed(&quot;should fail&quot;, 1, @error)
-    @fmt.dump_summary(0.1, 2, 1)
+    @fmt.example_started(&quot;should be pending&quot;)
+    @fmt.example_pending(&quot;A context&quot;, &quot;should be pending&quot;, &quot;Not Yet Implemented&quot;)
+    @fmt.start_dump
+    @fmt.dump_failure(1, mock(&quot;failure&quot;))
+    @fmt.dump_summary(0.1, 3, 1, 1)
+    @fmt.dump_pending
+    @fmt.close
   end
 
-  it &quot;should report deprecation when called with RSpec &lt; 0.9&quot; do
-    @fmt.should_receive(:warn).exactly(2).times
-    @fmt.deprecated
-    @fmt.deprecated
-    @fmt.deprecated
+  it &quot;should support RSpec 1.0.8 #add_behavior&quot; do
+    @formatter.should_receive(:start)
+    @formatter.should_receive(:add_behaviour).with(&quot;A context&quot;)
+    @formatter.should_receive(:example_started).once
+    @formatter.should_receive(:example_passed).once
+    @formatter.should_receive(:dump_summary)
+    @report_mgr.should_receive(:write_report)
+
+    @fmt.start(2)
+    @fmt.add_behaviour(&quot;A context&quot;)
+    @fmt.example_started(&quot;should pass&quot;)
+    @fmt.example_passed(&quot;should pass&quot;)
+    @fmt.dump_summary(0.1, 1, 0, 0)
   end
 end
\ No newline at end of file</diff>
      <filename>spec/ci/reporter/rspec_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f13ed9f9dd0d6765ae49557809d4500945d023dc</id>
    </parent>
  </parents>
  <author>
    <name>Nick</name>
    <email>nick@nicksieger.com</email>
  </author>
  <url>http://github.com/nicksieger/ci_reporter/commit/28d371d5b2ee3d5fee280ab063807c7f527249e6</url>
  <id>28d371d5b2ee3d5fee280ab063807c7f527249e6</id>
  <committed-date>2008-02-06T09:37:38-08:00</committed-date>
  <authored-date>2008-02-06T09:37:38-08:00</authored-date>
  <message>Tagging 1.5.1


git-svn-id: http://svn.caldersphere.net/svn/main/rubyforge/ci_reporter/tags/1.5.1@196 b03c2d0b-2f10-0410-a2f9-fc8001506dfa</message>
  <tree>f1034573703e8f8b102e0a7adaf993b1ee383326</tree>
  <committer>
    <name>Nick</name>
    <email>nick@nicksieger.com</email>
  </committer>
</commit>
