incubator-olio-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wso...@apache.org
Subject svn commit: r725524 [13/14] - in /incubator/olio/webapp/rails/trunk: app/controllers/ app/models/ app/views/events/ config/ config/environments/ spec/controllers/ spec/models/ vendor/plugins/attachment_fu/ vendor/plugins/attachment_fu/lib/ vendor/plugi...
Date Thu, 11 Dec 2008 01:34:30 GMT
Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/command_line_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/command_line_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/command_line_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/command_line_spec.rb Wed Dec 10 17:34:18 2008
@@ -3,144 +3,138 @@
 module Spec
   module Runner
     describe CommandLine, ".run" do
-      it_should_behave_like "sandboxed rspec_options"
-      attr_reader :options, :err, :out
-      before do
-        @err = options.error_stream
-        @out = options.output_stream
-      end
-
-      it "should run directory" do
-        file = File.dirname(__FILE__) + '/../../../examples/pure'
-        Spec::Runner::CommandLine.run(OptionParser.parse([file,"-p","**/*.rb"], @err, @out))
+      with_sandboxed_options do
+        attr_reader :err, :out
+        before do
+          @err = options.error_stream
+          @out = options.output_stream
+        end
+      
+        it "should run directory" do
+          file = File.dirname(__FILE__) + '/../../../examples/passing'
+          run_with(OptionParser.parse([file,"-p","**/*_spec.rb,**/*_example.rb"], @err, @out))
 
-        @out.rewind
-        @out.read.should =~ /\d+ examples, 0 failures, 3 pending/n
-      end
+          @out.rewind
+          @out.read.should =~ /\d+ examples, 0 failures, 3 pending/n
+        end
 
-      it "should run file" do
-        file = File.dirname(__FILE__) + '/../../../failing_examples/predicate_example.rb'
-        Spec::Runner::CommandLine.run(OptionParser.parse([file], @err, @out))
+        it "should run file" do
+          file = File.dirname(__FILE__) + '/../../../examples/failing/predicate_example.rb'
+          run_with(OptionParser.parse([file], @err, @out))
 
-        @out.rewind
-        @out.read.should =~ /2 examples, 1 failure/n
-      end
+          @out.rewind
+          @out.read.should =~ /3 examples, 2 failures/n
+        end
 
-      it "should raise when file does not exist" do
-        file = File.dirname(__FILE__) + '/doesntexist'
+        it "should raise when file does not exist" do
+          file = File.dirname(__FILE__) + '/doesntexist'
 
-        lambda {
-          Spec::Runner::CommandLine.run(OptionParser.parse([file], @err, @out))
-        }.should raise_error
-      end
+          lambda {
+            Spec::Runner::CommandLine.run(OptionParser.parse([file], @err, @out))
+          }.should raise_error
+        end
 
-      it "should return true when in --generate-options mode" do
-        # NOTE - this used to say /dev/null but jruby hangs on that for some reason
-        Spec::Runner::CommandLine.run(
-          OptionParser.parse(['--generate-options', '/tmp/foo'], @err, @out)
-        ).should be_true
-      end
+        it "should return true when in --generate-options mode" do
+          # NOTE - this used to say /dev/null but jruby hangs on that for some reason
+          Spec::Runner::CommandLine.run(
+            OptionParser.parse(['--generate-options', '/tmp/foo'], @err, @out)
+          ).should be_true
+        end
 
-      it "should dump even if Interrupt exception is occurred" do
-        example_group = Class.new(::Spec::Example::ExampleGroup) do
-          describe("example_group")
-          it "no error" do
-          end
+        it "should dump even if Interrupt exception is occurred" do
+          example_group = Class.new(::Spec::Example::ExampleGroup) do
+            describe("example_group")
+            it "no error" do
+            end
+
+            it "should interrupt" do
+              raise Interrupt, "I'm interrupting"
+            end
+          end
+
+          options = ::Spec::Runner::Options.new(@err, @out)
+          ::Spec::Runner::Options.should_receive(:new).with(@err, @out).and_return(options)
+          options.reporter.should_receive(:dump)
+          options.add_example_group(example_group)
 
-          it "should interrupt" do
-            raise Interrupt, "I'm interrupting"
-          end
+          Spec::Runner::CommandLine.run(OptionParser.parse([], @err, @out))
         end
 
-        options = ::Spec::Runner::Options.new(@err, @out)
-        ::Spec::Runner::Options.should_receive(:new).with(@err, @out).and_return(options)
-        options.reporter.should_receive(:dump)
-        options.add_example_group(example_group)
+        it "should heckle when options have heckle_runner" do
+          example_group = Class.new(::Spec::Example::ExampleGroup).describe("example_group") do
+            it "no error" do
+            end
+          end
+          options = ::Spec::Runner::Options.new(@err, @out)
+          ::Spec::Runner::Options.should_receive(:new).with(@err, @out).and_return(options)
+          options.add_example_group example_group
+
+          heckle_runner = mock("heckle_runner")
+          heckle_runner.should_receive(:heckle_with)
+          $rspec_mocks.__send__(:mocks).delete(heckle_runner)
 
-        Spec::Runner::CommandLine.run(OptionParser.parse([], @err, @out))
-      end
+          options.heckle_runner = heckle_runner
+          options.add_example_group(example_group)
 
-      it "should heckle when options have heckle_runner" do
-        example_group = Class.new(::Spec::Example::ExampleGroup).describe("example_group") do
-          it "no error" do
-          end
+          Spec::Runner::CommandLine.run(OptionParser.parse([], @err, @out))
+          heckle_runner.rspec_verify
         end
-        options = ::Spec::Runner::Options.new(@err, @out)
-        ::Spec::Runner::Options.should_receive(:new).with(@err, @out).and_return(options)
-        options.add_example_group example_group
-
-        heckle_runner = mock("heckle_runner")
-        heckle_runner.should_receive(:heckle_with)
-        $rspec_mocks.__send__(:mocks).delete(heckle_runner)
-
-        options.heckle_runner = heckle_runner
-        options.add_example_group(example_group)
-
-        Spec::Runner::CommandLine.run(OptionParser.parse([], @err, @out))
-        heckle_runner.rspec_verify
-      end
 
-      it "should run examples backwards if options.reverse is true" do
-        options = ::Spec::Runner::Options.new(@err, @out)
-        ::Spec::Runner::Options.should_receive(:new).with(@err, @out).and_return(options)
-        options.reverse = true
+        it "should run examples backwards if options.reverse is true" do
+          options = ::Spec::Runner::Options.new(@err, @out)
+          ::Spec::Runner::Options.should_receive(:new).with(@err, @out).and_return(options)
+          options.reverse = true
 
-        b1 = Class.new(Spec::Example::ExampleGroup)
-        b2 = Class.new(Spec::Example::ExampleGroup)
+          b1 = Class.new(Spec::Example::ExampleGroup)
+          b2 = Class.new(Spec::Example::ExampleGroup)
 
-        b2.should_receive(:run).ordered
-        b1.should_receive(:run).ordered
+          b2.should_receive(:run).ordered
+          b1.should_receive(:run).ordered
 
-        options.add_example_group(b1)
-        options.add_example_group(b2)
+          options.add_example_group(b1)
+          options.add_example_group(b2)
 
-        Spec::Runner::CommandLine.run(OptionParser.parse([], @err, @out))
-      end
+          Spec::Runner::CommandLine.run(OptionParser.parse([], @err, @out))
+        end
 
-      it "should pass its ExampleGroup to the reporter" do
-        example_group = Class.new(::Spec::Example::ExampleGroup).describe("example_group") do
-          it "should" do
+        it "should pass its ExampleGroup to the reporter" do
+          example_group = describe("example_group") do
+            it "should" do
+            end
           end
-        end
-        options = ::Spec::Runner::Options.new(@err, @out)
-        options.add_example_group(example_group)
+          options = ::Spec::Runner::Options.new(@err, @out)
+          options.add_example_group(example_group)
 
-        ::Spec::Runner::Options.should_receive(:new).with(@err, @out).and_return(options)
-        options.reporter.should_receive(:add_example_group).with(example_group)
+          ::Spec::Runner::Options.should_receive(:new).with(@err, @out).and_return(options)
+          options.reporter.should_receive(:add_example_group).with(example_group)
         
-        Spec::Runner::CommandLine.run(OptionParser.parse([], @err, @out))
-      end
-
-      it "runs only selected Examples when options.examples is set" do
-        options = ::Spec::Runner::Options.new(@err, @out)
-        ::Spec::Runner::Options.should_receive(:new).with(@err, @out).and_return(options)
-
-        options.examples << "example_group should"
-        should_has_run = false
-        should_not_has_run = false
-        example_group = Class.new(::Spec::Example::ExampleGroup).describe("example_group") do
-          it "should" do
-            should_has_run = true
-          end
-          it "should not" do
-            should_not_has_run = true
-          end
+          Spec::Runner::CommandLine.run(OptionParser.parse([], @err, @out))
         end
 
-        options.reporter.should_receive(:add_example_group).with(example_group)
+        it "runs only selected Examples when options.examples is set" do
+          options = ::Spec::Runner::Options.new(@err, @out)
+          ::Spec::Runner::Options.should_receive(:new).with(@err, @out).and_return(options)
+
+          options.examples << "example group expected example"
+          expected_example_was_run = false
+          unexpected_example_was_run = false
+          example_group = describe("example group") do
+            it "expected example" do
+              expected_example_was_run = true
+            end
+            it "unexpected example" do
+              unexpected_example_was_run = true
+            end
+          end
 
-        options.add_example_group example_group
-        Spec::Runner::CommandLine.run(OptionParser.parse([], @err, @out))
+          options.reporter.should_receive(:add_example_group).with(example_group)
 
-        should_has_run.should be_true
-        should_not_has_run.should be_false
-      end
+          options.add_example_group example_group
+          run_with(options)
 
-      it "sets Spec.run to true" do
-        ::Spec.run = false
-        ::Spec.should_not be_run
-        Spec::Runner::CommandLine.run(OptionParser.parse([], @err, @out))
-        ::Spec.should be_run
+          expected_example_was_run.should be_true
+          unexpected_example_was_run.should be_false
+        end
       end
     end
   end

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/drb_command_line_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/drb_command_line_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/drb_command_line_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/drb_command_line_spec.rb Wed Dec 10 17:34:18 2008
@@ -15,12 +15,16 @@
       end    
     end
 
-    class DrbCommandLineSpec < ::Spec::Example::ExampleGroup
-      describe DrbCommandLine, "with local server"
+    describe "with local server" do
 
       class CommandLineForSpec
         def self.run(argv, stderr, stdout)
-          exit Spec::Runner::CommandLine.run(OptionParser.parse(argv, stderr, stdout))
+          orig_options = Spec::Runner.options
+          tmp_options = OptionParser.parse(argv, stderr, stdout)
+          Spec::Runner.use tmp_options
+          Spec::Runner::CommandLine.run(tmp_options)
+        ensure
+          Spec::Runner.use orig_options
         end
       end
       
@@ -45,7 +49,7 @@
 
         it "should run against local server" do
           out = run_spec_via_druby(['--version'])
-          out.should =~ /RSpec/n
+          out.should =~ /rspec \d+\.\d+\.\d+.*/n
         end
 
         it "should output green colorized text when running with --colour option" do
@@ -86,7 +90,8 @@
           out.rewind; out.read
         end
       end
-
+      
     end
+
   end
 end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/base_formatter_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/base_formatter_spec.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/base_formatter_spec.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/base_formatter_spec.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,112 @@
+require File.dirname(__FILE__) + "/../../../spec_helper"
+
+module Spec
+  module Runner
+    module Formatter
+      describe BaseFormatter do
+        before :each do
+          @options, @where = nil, nil
+          @formatter = BaseFormatter.new(@options, @where)
+        end
+        
+        class HaveInterfaceMatcher
+          def initialize(method)
+            @method = method
+          end
+          
+          attr_reader :object
+          attr_reader :method
+          
+          def matches?(object)
+            @object = object
+            object.respond_to?(@method)
+          end
+          
+          def with(arity)
+            WithArity.new(self, @method, arity)
+          end
+          
+          class WithArity
+            def initialize(matcher, method, arity)
+              @have_matcher = matcher
+              @method = method
+              @arity  = arity
+            end
+            
+            def matches?(an_object)
+              @have_matcher.matches?(an_object) && real_arity == @arity
+            end
+            
+            def failure_message
+              "#{@have_matcher} should have method :#{@method} with #{argument_arity}, but it had #{real_arity}"
+            end
+            
+            def arguments
+              self
+            end
+            
+            alias_method :argument, :arguments
+            
+          private
+            
+            def real_arity
+              @have_matcher.object.method(@method).arity
+            end
+            
+            def argument_arity
+              if @arity == 1
+                "1 argument"
+              else
+                "#{@arity} arguments"
+              end
+            end
+          end
+        end
+        
+        def have_interface_for(method)
+          HaveInterfaceMatcher.new(method)
+        end
+        
+        it "should have start as an interface with one argument"do
+          @formatter.should have_interface_for(:start).with(1).argument
+        end
+        
+        it "should have add_example_group as an interface with one argument" do
+          @formatter.should have_interface_for(:add_example_group).with(1).argument
+        end
+        
+        it "should have example_started as an interface with one argument" do
+          @formatter.should have_interface_for(:example_started).with(1).argument
+        end
+        
+        it "should have example_failed as an interface with three arguments" do
+          @formatter.should have_interface_for(:example_failed).with(3).arguments
+        end
+        
+        it "should have example_pending as an interface with three arguments" do
+          @formatter.should have_interface_for(:example_pending).with(3).arguments
+        end
+        
+        it "should have start_dump as an interface with zero arguments" do
+          @formatter.should have_interface_for(:start_dump).with(0).arguments
+        end
+        
+        it "should have dump_failure as an interface with two arguments" do
+          @formatter.should have_interface_for(:dump_failure).with(2).arguments
+        end
+        
+        it "should have dump_summary as an interface with two arguments" do
+          @formatter.should have_interface_for(:dump_failure).with(2).arguments
+        end
+
+        it "should have dump_pending as an interface with zero arguments" do
+          @formatter.should have_interface_for(:dump_pending).with(0).arguments
+        end
+
+        it "should have close  as an interface with zero arguments" do
+          @formatter.should have_interface_for(:close).with(0).arguments
+        end
+      end
+    end
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/base_text_formatter_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/base_text_formatter_spec.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/base_text_formatter_spec.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/base_text_formatter_spec.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,22 @@
+require File.dirname(__FILE__) + '/../../../spec_helper'
+require 'spec/runner/formatter/base_text_formatter'
+
+module Spec
+  module Runner
+    module Formatter
+      describe BaseTextFormatter do
+        
+        before :all do
+          @sandbox = "spec/sandbox"
+        end
+
+        it "should create the directory contained in WHERE if it does not exist" do
+          FileUtils.should_receive(:mkdir_p).with(@sandbox)
+          File.stub!(:open)
+          BaseTextFormatter.new({},"#{@sandbox}/temp.rb")
+        end
+
+      end
+    end
+  end
+end

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.4.html
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.4.html?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.4.html (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.4.html Wed Dec 10 17:34:18 2008
@@ -188,7 +188,7 @@
       <span class="failed_spec_name">should fail when expected message not received</span>
       <div class="failure" id="failure_1">
         <div class="message"><pre>Mock 'poke me' expected :poke with (any args) once, but received it 0 times</pre></div>
-        <div class="backtrace"><pre>./failing_examples/mocking_example.rb:13:
+        <div class="backtrace"><pre>./examples/failing/mocking_example.rb:13:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:24:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:20:</pre></div>
     <pre class="ruby"><code><span class="linenum">11</span>  <span class="ident">it</span> <span class="punct">&quot;</span><span class="string">should fail when expected message not received</span><span class="punct">&quot;</span> <span class="keyword">do</span>
@@ -203,7 +203,7 @@
       <span class="failed_spec_name">should fail when messages are received out of order</span>
       <div class="failure" id="failure_2">
         <div class="message"><pre>Mock 'one two three' received :three out of order</pre></div>
-        <div class="backtrace"><pre>./failing_examples/mocking_example.rb:22:
+        <div class="backtrace"><pre>./examples/failing/mocking_example.rb:22:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:24:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:20:</pre></div>
     <pre class="ruby"><code><span class="linenum">20</span>    <span class="ident">mock</span><span class="punct">.</span><span class="ident">should_receive</span><span class="punct">(</span><span class="symbol">:three</span><span class="punct">).</span><span class="ident">ordered</span>
@@ -218,7 +218,7 @@
       <span class="failed_spec_name">should get yelled at when sending unexpected messages</span>
       <div class="failure" id="failure_3">
         <div class="message"><pre>Mock 'don't talk to me' expected :any_message_at_all with (any args) 0 times, but received it once</pre></div>
-        <div class="backtrace"><pre>./failing_examples/mocking_example.rb:28:
+        <div class="backtrace"><pre>./examples/failing/mocking_example.rb:28:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:24:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:20:</pre></div>
     <pre class="ruby"><code><span class="linenum">26</span>  <span class="ident">it</span> <span class="punct">&quot;</span><span class="string">should get yelled at when sending unexpected messages</span><span class="punct">&quot;</span> <span class="keyword">do</span>
@@ -233,7 +233,7 @@
       <span class="failed_spec_name">has a bug we need to fix</span>
       <div class="failure" id="failure_4">
         <div class="message"><pre>Expected pending 'here is the bug' to fail. No Error was raised.</pre></div>
-        <div class="backtrace"><pre>./failing_examples/mocking_example.rb:33:
+        <div class="backtrace"><pre>./examples/failing/mocking_example.rb:33:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:24:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:20:</pre></div>
     <pre class="ruby"><code><span class="linenum">31</span>
@@ -262,7 +262,7 @@
 +behaviour driven development
  framework for Ruby
 </pre></div>
-        <div class="backtrace"><pre>./failing_examples/diffing_spec.rb:13:
+        <div class="backtrace"><pre>./examples/failing/diffing_spec.rb:13:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:24:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:20:</pre></div>
     <pre class="ruby"><code><span class="linenum">11</span><span class="ident">framework</span> <span class="keyword">for</span> <span class="constant">Ruby</span>
@@ -292,7 +292,7 @@
 +species=tortoise
  &gt;
 </pre></div>
-        <div class="backtrace"><pre>./failing_examples/diffing_spec.rb:34:
+        <div class="backtrace"><pre>./examples/failing/diffing_spec.rb:34:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:24:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:20:</pre></div>
     <pre class="ruby"><code><span class="linenum">32</span>    <span class="ident">expected</span> <span class="punct">=</span> <span class="constant">Animal</span><span class="punct">.</span><span class="ident">new</span> <span class="punct">&quot;</span><span class="string">bob</span><span class="punct">&quot;,</span> <span class="punct">&quot;</span><span class="string">giraffe</span><span class="punct">&quot;</span>

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html Wed Dec 10 17:34:18 2008
@@ -188,7 +188,7 @@
       <span class="failed_spec_name">should fail when expected message not received</span>
       <div class="failure" id="failure_1">
         <div class="message"><pre>Mock 'poke me' expected :poke with (any args) once, but received it 0 times</pre></div>
-        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/mocking_example.rb:13:in `should_receive'
+        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/mocking_example.rb:13:in `should_receive'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:24:in `run'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:20:in `chdir'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:20:in `chdir'
@@ -206,8 +206,8 @@
       <span class="failed_spec_name">should fail when messages are received out of order</span>
       <div class="failure" id="failure_2">
         <div class="message"><pre>Mock 'one two three' received :three out of order</pre></div>
-        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/mocking_example.rb:22:in `three'
-/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/mocking_example.rb:16:in `instance_eval'
+        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/mocking_example.rb:22:in `three'
+/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/mocking_example.rb:16:in `instance_eval'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:24:in `run'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:20:in `chdir'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:20:in `chdir'
@@ -225,7 +225,7 @@
       <span class="failed_spec_name">should get yelled at when sending unexpected messages</span>
       <div class="failure" id="failure_3">
         <div class="message"><pre>Mock 'don't talk to me' expected :any_message_at_all with (any args) 0 times, but received it once</pre></div>
-        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/mocking_example.rb:28:in `should_not_receive'
+        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/mocking_example.rb:28:in `should_not_receive'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:24:in `run'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:20:in `chdir'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:20:in `chdir'
@@ -243,8 +243,8 @@
       <span class="failed_spec_name">has a bug we need to fix</span>
       <div class="failure" id="failure_4">
         <div class="message"><pre>Expected pending 'here is the bug' to fail. No Error was raised.</pre></div>
-        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/mocking_example.rb:33:in `pending'
-/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/mocking_example.rb:33:in `instance_eval'
+        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/mocking_example.rb:33:in `pending'
+/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/mocking_example.rb:33:in `instance_eval'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:24:in `run'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:20:in `chdir'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:20:in `chdir'
@@ -276,7 +276,7 @@
 +behaviour driven development
  framework for Ruby
 </pre></div>
-        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/diffing_spec.rb:13:in `=='
+        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/diffing_spec.rb:13:in `=='
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:24:in `run'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:20:in `chdir'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:20:in `chdir'
@@ -310,8 +310,8 @@
 +species=tortoise
  &gt;
 </pre></div>
-        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/diffing_spec.rb:34:in `should'
-/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/diffing_spec.rb:31:in `instance_eval'
+        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/diffing_spec.rb:34:in `should'
+/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/diffing_spec.rb:31:in `instance_eval'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:24:in `run'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:20:in `chdir'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:20:in `chdir'

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5.html
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5.html?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5.html (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5.html Wed Dec 10 17:34:18 2008
@@ -188,7 +188,7 @@
       <span class="failed_spec_name">should fail when expected message not received</span>
       <div class="failure" id="failure_1">
         <div class="message"><pre>Mock 'poke me' expected :poke with (any args) once, but received it 0 times</pre></div>
-        <div class="backtrace"><pre>./failing_examples/mocking_example.rb:13:
+        <div class="backtrace"><pre>./examples/failing/mocking_example.rb:13:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:17:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:13:in `chdir'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:13:</pre></div>
@@ -204,7 +204,7 @@
       <span class="failed_spec_name">should fail when messages are received out of order</span>
       <div class="failure" id="failure_2">
         <div class="message"><pre>Mock 'one two three' received :three out of order</pre></div>
-        <div class="backtrace"><pre>./failing_examples/mocking_example.rb:22:
+        <div class="backtrace"><pre>./examples/failing/mocking_example.rb:22:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:17:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:13:in `chdir'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:13:</pre></div>
@@ -220,7 +220,7 @@
       <span class="failed_spec_name">should get yelled at when sending unexpected messages</span>
       <div class="failure" id="failure_3">
         <div class="message"><pre>Mock 'don't talk to me' expected :any_message_at_all with (any args) 0 times, but received it once</pre></div>
-        <div class="backtrace"><pre>./failing_examples/mocking_example.rb:28:
+        <div class="backtrace"><pre>./examples/failing/mocking_example.rb:28:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:17:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:13:in `chdir'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:13:</pre></div>
@@ -236,7 +236,7 @@
       <span class="failed_spec_name">has a bug we need to fix</span>
       <div class="failure" id="failure_4">
         <div class="message"><pre>Expected pending 'here is the bug' to fail. No Error was raised.</pre></div>
-        <div class="backtrace"><pre>./failing_examples/mocking_example.rb:33:
+        <div class="backtrace"><pre>./examples/failing/mocking_example.rb:33:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:17:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:13:in `chdir'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:13:</pre></div>
@@ -266,7 +266,7 @@
 +behaviour driven development
  framework for Ruby
 </pre></div>
-        <div class="backtrace"><pre>./failing_examples/diffing_spec.rb:13:
+        <div class="backtrace"><pre>./examples/failing/diffing_spec.rb:13:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:17:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:13:in `chdir'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:13:</pre></div>
@@ -297,7 +297,7 @@
 +species=tortoise
  &gt;
 </pre></div>
-        <div class="backtrace"><pre>./failing_examples/diffing_spec.rb:34:
+        <div class="backtrace"><pre>./examples/failing/diffing_spec.rb:34:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:17:
 ./spec/spec/runner/formatter/html_formatter_spec.rb:13:in `chdir'
 ./spec/spec/runner/formatter/html_formatter_spec.rb:13:</pre></div>

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html Wed Dec 10 17:34:18 2008
@@ -188,7 +188,7 @@
       <span class="failed_spec_name">should fail when expected message not received</span>
       <div class="failure" id="failure_1">
         <div class="message"><pre>Mock 'poke me' expected :poke with (any args) once, but received it 0 times</pre></div>
-        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/mocking_example.rb:13:
+        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/mocking_example.rb:13:
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:28:
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:24:in `chdir'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:24:
@@ -205,8 +205,8 @@
       <span class="failed_spec_name">should fail when messages are received out of order</span>
       <div class="failure" id="failure_2">
         <div class="message"><pre>Mock 'one two three' received :three out of order</pre></div>
-        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/mocking_example.rb:22:
-/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/mocking_example.rb:16:in `instance_eval'
+        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/mocking_example.rb:22:
+/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/mocking_example.rb:16:in `instance_eval'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:28:
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:24:in `chdir'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:24:
@@ -223,7 +223,7 @@
       <span class="failed_spec_name">should get yelled at when sending unexpected messages</span>
       <div class="failure" id="failure_3">
         <div class="message"><pre>Mock 'don't talk to me' expected :any_message_at_all with (any args) 0 times, but received it once</pre></div>
-        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/mocking_example.rb:28:
+        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/mocking_example.rb:28:
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:28:
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:24:in `chdir'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:24:
@@ -240,8 +240,8 @@
       <span class="failed_spec_name">has a bug we need to fix</span>
       <div class="failure" id="failure_4">
         <div class="message"><pre>Expected pending 'here is the bug' to fail. No Error was raised.</pre></div>
-        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/mocking_example.rb:33:
-/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/mocking_example.rb:33:in `instance_eval'
+        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/mocking_example.rb:33:
+/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/mocking_example.rb:33:in `instance_eval'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:28:
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:24:in `chdir'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:24:
@@ -272,8 +272,8 @@
 +behaviour driven development
  framework for Ruby
 </pre></div>
-        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/diffing_spec.rb:13:
-/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/diffing_spec.rb:2:in `instance_eval'
+        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/diffing_spec.rb:13:
+/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/diffing_spec.rb:2:in `instance_eval'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:28:
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:24:in `chdir'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:24:
@@ -305,8 +305,8 @@
 +species=tortoise
  &gt;
 </pre></div>
-        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/diffing_spec.rb:34:
-/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./failing_examples/diffing_spec.rb:31:in `instance_eval'
+        <div class="backtrace"><pre>/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/diffing_spec.rb:34:
+/Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./examples/failing/diffing_spec.rb:31:in `instance_eval'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:28:
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:24:in `chdir'
 /Users/david/projects/ruby/jruby/testsuites/rspec/target/rspec/./spec/spec/runner/formatter/html_formatter_spec.rb:24:

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6.html
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6.html?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6.html (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6.html Wed Dec 10 17:34:18 2008
@@ -188,7 +188,7 @@
       <span class="failed_spec_name">should fail when expected message not received</span>
       <div class="failure" id="failure_1">
         <div class="message"><pre>Mock 'poke me' expected :poke with (any args) once, but received it 0 times</pre></div>
-        <div class="backtrace"><pre>./failing_examples/mocking_example.rb:13:
+        <div class="backtrace"><pre>./examples/failing/mocking_example.rb:13:
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:21:in `chdir'
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:21:</pre></div>
@@ -204,7 +204,7 @@
       <span class="failed_spec_name">should fail when messages are received out of order</span>
       <div class="failure" id="failure_2">
         <div class="message"><pre>Mock 'one two three' received :three out of order</pre></div>
-        <div class="backtrace"><pre>./failing_examples/mocking_example.rb:22:
+        <div class="backtrace"><pre>./examples/failing/mocking_example.rb:22:
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:21:in `chdir'
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:21:</pre></div>
@@ -220,7 +220,7 @@
       <span class="failed_spec_name">should get yelled at when sending unexpected messages</span>
       <div class="failure" id="failure_3">
         <div class="message"><pre>Mock 'don't talk to me' expected :any_message_at_all with (no args) 0 times, but received it once</pre></div>
-        <div class="backtrace"><pre>./failing_examples/mocking_example.rb:29:
+        <div class="backtrace"><pre>./examples/failing/mocking_example.rb:29:
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:21:in `chdir'
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:21:</pre></div>
@@ -235,7 +235,7 @@
       <span class="failed_spec_name">has a bug we need to fix</span>
       <div class="failure" id="failure_4">
         <div class="message"><pre>Expected pending 'here is the bug' to fail. No Error was raised.</pre></div>
-        <div class="backtrace"><pre>./failing_examples/mocking_example.rb:33:
+        <div class="backtrace"><pre>./examples/failing/mocking_example.rb:33:
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:21:in `chdir'
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:21:</pre></div>
@@ -265,7 +265,7 @@
 +behavior driven development
  framework for Ruby
 </pre></div>
-        <div class="backtrace"><pre>./failing_examples/diffing_spec.rb:13:
+        <div class="backtrace"><pre>./examples/failing/diffing_spec.rb:13:
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:21:in `chdir'
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:21:</pre></div>
@@ -296,7 +296,7 @@
 +species=giraffe
  &gt;
 </pre></div>
-        <div class="backtrace"><pre>./failing_examples/diffing_spec.rb:34:
+        <div class="backtrace"><pre>./examples/failing/diffing_spec.rb:34:
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:21:in `chdir'
 /Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:21:</pre></div>

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb Wed Dec 10 17:34:18 2008
@@ -19,12 +19,10 @@
             expected_html = File.read(expected_file)
 
             Dir.chdir(root) do
-              args = ['failing_examples/mocking_example.rb', 'failing_examples/diffing_spec.rb', 'examples/pure/stubbing_example.rb',  'examples/pure/pending_example.rb', '--format', 'html', opt]
+              args = ['examples/failing/mocking_example.rb', 'examples/failing/diffing_spec.rb', 'examples/passing/stubbing_example.rb',  'examples/passing/pending_example.rb', '--format', 'html', opt]
               err = StringIO.new
               out = StringIO.new
-              CommandLine.run(
-                OptionParser.parse(args, err, out)
-              )
+              run_with OptionParser.parse(args, err, out)
 
               seconds = /\d+\.\d+ seconds/
               html = out.string.gsub seconds, 'x seconds'

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/nested_text_formatter_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/nested_text_formatter_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/nested_text_formatter_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/nested_text_formatter_spec.rb Wed Dec 10 17:34:18 2008
@@ -5,329 +5,314 @@
   module Runner
     module Formatter
       describe NestedTextFormatter do
-        it_should_behave_like "sandboxed rspec_options"
-        attr_reader :io, :options, :formatter, :example_group
-        before(:each) do
-          @io = StringIO.new
-          options.stub!(:dry_run).and_return(false)
-          options.stub!(:colour).and_return(false)
-          @formatter = NestedTextFormatter.new(options, io)
-          @example_group = ::Spec::Example::ExampleGroup.describe("ExampleGroup") do
-            specify "example" do
+        with_sandboxed_options do
+          attr_reader :io, :options, :formatter, :example_group
+          before(:each) do
+            @io = StringIO.new
+            options.stub!(:dry_run).and_return(false)
+            options.stub!(:colour).and_return(false)
+            @formatter = NestedTextFormatter.new(options, io)
+            @example_group = ::Spec::Example::ExampleGroup.describe("ExampleGroup") do
+              specify "example" do
+              end
             end
           end
-        end
-
-        describe "where ExampleGroup has no superclasss with a description" do
-          before do
-            add_example_group
-          end
 
-          def add_example_group
-            formatter.add_example_group(example_group)
-          end
+          describe "where ExampleGroup has no superclasss with a description" do
+            before do
+              add_example_group
+            end
 
-          describe "#dump_summary" do
-            it "should produce standard summary without pending when pending has a 0 count" do
-              formatter.dump_summary(3, 2, 1, 0)
-              expected_output = <<-OUT
-              ExampleGroup
+            def add_example_group
+              formatter.add_example_group(example_group)
+            end
 
-              Finished in 3 seconds
+            describe "#dump_summary" do
+              it "should produce standard summary without pending when pending has a 0 count" do
+                formatter.dump_summary(3, 2, 1, 0)
+                io.string.should == <<-OUT
+ExampleGroup
 
-              2 examples, 1 failure
-              OUT
+Finished in 3 seconds
 
-              io.string.should == expected_output.gsub(/^              /, '')
-            end
+2 examples, 1 failure
+OUT
+              end
 
-            it "should produce standard summary" do
-              formatter.dump_summary(3, 2, 1, 4)
-              expected_output = <<-OUT
-              ExampleGroup
+              it "should produce standard summary" do
+                formatter.dump_summary(3, 2, 1, 4)
+                io.string.should == <<-OUT
+ExampleGroup
 
-              Finished in 3 seconds
+Finished in 3 seconds
 
-              2 examples, 1 failure, 4 pending
-              OUT
-              io.string.should == expected_output.gsub(/^              /, '')
-            end
-          end
-
-          describe "#add_example_group" do
-            describe "when ExampleGroup has description_args" do
-              before do
-                example_group.description_args.should_not be_nil
+2 examples, 1 failure, 4 pending
+OUT
               end
+            end
 
-              describe "when ExampleGroup has no parents with description args" do
+            describe "#add_example_group" do
+              describe "when ExampleGroup has description_args" do
                 before do
-                  example_group.superclass.description_args.should be_nil
+                  example_group.description_args.should_not be_nil
                 end
 
-                it "should push ExampleGroup name" do
-                  io.string.should eql("ExampleGroup\n")
-                end
-              end
+                describe "when ExampleGroup has no parents with description args" do
+                  before do
+                    example_group.superclass.description_args.should be_empty
+                  end
 
-              describe "when ExampleGroup has one parent with description args" do
-                attr_reader :child_example_group
-                def add_example_group
-                  example_group.description_args.should_not be_nil
-                  @child_example_group = Class.new(example_group).describe("Child ExampleGroup")
+                  it "should push ExampleGroup name" do
+                    io.string.should eql("ExampleGroup\n")
+                  end
                 end
 
-                describe "and parent ExampleGroups have not been printed" do
-                  before do
-                    formatter.add_example_group(child_example_group)
+                describe "when ExampleGroup has one parent with description args" do
+                  attr_reader :child_example_group
+                  def add_example_group
+                    example_group.description_args.should_not be_nil
+                    @child_example_group = Class.new(example_group).describe("Child ExampleGroup")
                   end
 
-                  it "should push ExampleGroup name with two spaces of indentation" do
-                    expected_output = <<-OUT
-                    ExampleGroup
-                      Child ExampleGroup
-                    OUT
-                    io.string.should == expected_output.gsub(/^                    /, '')
+                  describe "and parent ExampleGroups have not been printed" do
+                    before do
+                      formatter.add_example_group(child_example_group)
+                    end
+
+                    it "should push ExampleGroup name with two spaces of indentation" do
+                      io.string.should == <<-OUT
+ExampleGroup
+  Child ExampleGroup
+OUT
+                    end
+                  end
+
+                  describe "and parent ExampleGroups have been printed" do
+                    before do
+                      formatter.add_example_group(example_group)
+                      io.string = ""
+                      formatter.add_example_group(child_example_group)
+                    end
+
+                    it "should print only the indented ExampleGroup" do
+                      io.string.should == <<-OUT
+  Child ExampleGroup
+OUT
+                    end
                   end
                 end
 
-                describe "and parent ExampleGroups have been printed" do
-                  before do
-                    formatter.add_example_group(example_group)
-                    io.string = ""
-                    formatter.add_example_group(child_example_group)
+                describe "when ExampleGroup has two parents with description args" do
+                  attr_reader :child_example_group, :grand_child_example_group
+                  def add_example_group
+                    example_group.description_args.should_not be_nil
+                    @child_example_group = Class.new(example_group).describe("Child ExampleGroup")
+                    @grand_child_example_group = Class.new(child_example_group).describe("GrandChild ExampleGroup")
+                  end
+
+                  describe "and parent ExampleGroups have not been printed" do
+                    before do
+                      formatter.add_example_group(grand_child_example_group)
+                    end
+
+                    it "should print the entire nested ExampleGroup heirarchy" do
+                      io.string.should == <<-OUT
+ExampleGroup
+  Child ExampleGroup
+    GrandChild ExampleGroup
+OUT
+                    end
                   end
 
-                  it "should print only the indented ExampleGroup" do
-                    expected_output = <<-OUT
-                      Child ExampleGroup
-                    OUT
-                    io.string.should == expected_output.gsub(/^                    /, '')
+                  describe "and parent ExampleGroups have been printed" do
+                    before do
+                      formatter.add_example_group(child_example_group)
+                      io.string = ""
+                      formatter.add_example_group(grand_child_example_group)
+                    end
+
+                    it "should print only the indented ExampleGroup" do
+                      io.string.should == <<-OUT
+    GrandChild ExampleGroup
+OUT
+                    end
                   end
                 end
               end
 
-              describe "when ExampleGroup has two parents with description args" do
-                attr_reader :child_example_group, :grand_child_example_group
-                def add_example_group
-                  example_group.description_args.should_not be_nil
-                  @child_example_group = Class.new(example_group).describe("Child ExampleGroup")
-                  @grand_child_example_group = Class.new(child_example_group).describe("GrandChild ExampleGroup")
-                end
+              describe "when ExampleGroup description_args is nil" do
+                attr_reader :child_example_group
 
                 describe "and parent ExampleGroups have not been printed" do
-                  before do
-                    formatter.add_example_group(grand_child_example_group)
+                  def add_example_group
+                    @child_example_group = Class.new(example_group)
+                    child_example_group.description_args.should be_empty
+                    formatter.add_example_group(child_example_group)
                   end
 
-                  it "should print the entire nested ExampleGroup heirarchy" do
-                    expected_output = <<-OUT
-                    ExampleGroup
-                      Child ExampleGroup
-                        GrandChild ExampleGroup
-                    OUT
-                    io.string.should == expected_output.gsub(/^                    /, '')
+                  it "should render only the parent ExampleGroup" do
+                    io.string.should == <<-OUT
+ExampleGroup
+OUT
                   end
                 end
 
                 describe "and parent ExampleGroups have been printed" do
-                  before do
-                    formatter.add_example_group(child_example_group)
+                  def add_example_group
+                    @child_example_group = Class.new(example_group)
+                    child_example_group.description_args.should be_empty
+                    formatter.add_example_group(example_group)
                     io.string = ""
-                    formatter.add_example_group(grand_child_example_group)
+                    formatter.add_example_group(child_example_group)
                   end
 
-                  it "should print only the indented ExampleGroup" do
-                    expected_output = <<-OUT
-                        GrandChild ExampleGroup
-                    OUT
-                    io.string.should == expected_output.gsub(/^                    /, '')
+                  it "should not render anything" do
+                    io.string.should == ""
                   end
                 end
               end
-            end
-
-            describe "when ExampleGroup description_args is nil" do
-              attr_reader :child_example_group
 
-              describe "and parent ExampleGroups have not been printed" do
+              describe "when ExampleGroup description_args is empty" do
                 def add_example_group
-                  @child_example_group = Class.new(example_group)
-                  child_example_group.description_args.should be_nil
-                  formatter.add_example_group(child_example_group)
+                  example_group.set_description
+                  example_group.description_args.should be_empty
+                  super
                 end
 
-                it "should render only the parent ExampleGroup" do
-                  expected_output = <<-OUT
-                  ExampleGroup
-                  OUT
-                  io.string.should == expected_output.gsub(/^                  /, '')
+                it "should not render anything" do
+                  io.string.should == ""
                 end
               end
+            end
 
-              describe "and parent ExampleGroups have been printed" do
-                def add_example_group
-                  @child_example_group = Class.new(example_group)
-                  child_example_group.description_args.should be_nil
-                  formatter.add_example_group(example_group)
-                  io.string = ""
-                  formatter.add_example_group(child_example_group)
+            describe "#example_failed" do
+              describe "where ExampleGroup has no superclasss with a description" do
+                describe "when having an error" do
+                  it "should push failing spec name and failure number" do
+                    formatter.example_failed(
+                      example_group.it("spec"),
+                      98,
+                      Reporter::Failure.new("c s", RuntimeError.new)
+                    )
+                    io.string.should == <<-OUT
+ExampleGroup
+  spec (ERROR - 98)
+OUT
+                  end
                 end
 
-                it "should not render anything" do
-                  io.string.should == ""
+                describe "when having an expectation failure" do
+                  it "should push failing spec name and failure number" do
+                    formatter.example_failed(
+                      example_group.it("spec"),
+                      98,
+                      Reporter::Failure.new("c s", Spec::Expectations::ExpectationNotMetError.new)
+                    )
+                    io.string.should == <<-OUT
+ExampleGroup
+  spec (FAILED - 98)
+OUT
+                  end
                 end
               end
-            end
 
-            describe "when ExampleGroup description_args is empty" do
-              def add_example_group
-                example_group.set_description
-                example_group.description_args.should be_empty
-                super
-              end
+              describe "where ExampleGroup has two superclasses with a description" do
+                attr_reader :child_example_group, :grand_child_example_group
 
-              it "should not render anything" do
-                io.string.should == ""
-              end
-            end
-          end
+                def add_example_group
+                  @child_example_group = Class.new(example_group).describe("Child ExampleGroup")
+                  @grand_child_example_group = Class.new(child_example_group).describe("GrandChild ExampleGroup")
+                  formatter.add_example_group(grand_child_example_group)
+                end
 
-          describe "#example_failed" do
-            describe "where ExampleGroup has no superclasss with a description" do
-              describe "when having an error" do
-                it "should push failing spec name and failure number" do
-                  formatter.example_failed(
-                    example_group.it("spec"),
-                    98,
-                    Reporter::Failure.new("c s", RuntimeError.new)
-                  )
-                  expected_output = <<-OUT
-                  ExampleGroup
-                    spec (ERROR - 98)
-                  OUT
-                  io.string.should == expected_output.gsub(/^                  /, '')
-                end
-              end
-
-              describe "when having an expectation failure" do
-                it "should push failing spec name and failure number" do
-                  formatter.example_failed(
-                    example_group.it("spec"),
-                    98,
-                    Reporter::Failure.new("c s", Spec::Expectations::ExpectationNotMetError.new)
-                  )
-                  expected_output = <<-OUT
-                  ExampleGroup
-                    spec (FAILED - 98)
-                  OUT
-                  io.string.should == expected_output.gsub(/^                  /, '')
-                end
-              end
-            end
-
-            describe "where ExampleGroup has two superclasses with a description" do
-              attr_reader :child_example_group, :grand_child_example_group
-
-              def add_example_group
-                @child_example_group = Class.new(example_group).describe("Child ExampleGroup")
-                @grand_child_example_group = Class.new(child_example_group).describe("GrandChild ExampleGroup")
-                formatter.add_example_group(grand_child_example_group)
-              end
-
-              describe "when having an error" do
-                it "should push failing spec name and failure number" do
-                  formatter.example_failed(
-                    grand_child_example_group.it("spec"),
-                    98,
-                    Reporter::Failure.new("c s", RuntimeError.new)
-                  )
-                  expected_output = <<-OUT
-                  ExampleGroup
-                    Child ExampleGroup
-                      GrandChild ExampleGroup
-                        spec (ERROR - 98)
-                  OUT
-                  io.string.should == expected_output.gsub(/^                  /, '')
-                end
-              end
-
-              describe "when having an expectation" do
-                it "should push failing spec name and failure number" do
-                  formatter.example_failed(
-                    grand_child_example_group.it("spec"),
-                    98,
-                    Reporter::Failure.new("c s", Spec::Expectations::ExpectationNotMetError.new)
-                  )
-                  expected_output = <<-OUT
-                  ExampleGroup
-                    Child ExampleGroup
-                      GrandChild ExampleGroup
-                        spec (FAILED - 98)
-                  OUT
-                  io.string.should == expected_output.gsub(/^                  /, '')
+                describe "when having an error" do
+                  it "should push failing spec name and failure number" do
+                    formatter.example_failed(
+                      grand_child_example_group.it("spec"),
+                      98,
+                      Reporter::Failure.new("c s", RuntimeError.new)
+                    )
+                    io.string.should == <<-OUT
+ExampleGroup
+  Child ExampleGroup
+    GrandChild ExampleGroup
+      spec (ERROR - 98)
+OUT
+                  end
+                end
+
+                describe "when having an expectation" do
+                  it "should push failing spec name and failure number" do
+                    formatter.example_failed(
+                      grand_child_example_group.it("spec"),
+                      98,
+                      Reporter::Failure.new("c s", Spec::Expectations::ExpectationNotMetError.new)
+                    )
+                    io.string.should == <<-OUT
+ExampleGroup
+  Child ExampleGroup
+    GrandChild ExampleGroup
+      spec (FAILED - 98)
+OUT
+                  end
                 end
               end
             end
-          end
 
-          describe "#start" do
-            it "should push nothing on start" do
-              formatter.start(5)
-              expected_output = <<-OUT
-              ExampleGroup
-              OUT
-              io.string.should == expected_output.gsub(/^              /, '')
+            describe "#start" do
+              it "should push nothing on start" do
+                formatter.start(5)
+                io.string.should == <<-OUT
+ExampleGroup
+OUT
+              end
             end
-          end
 
-          describe "#start_dump" do
-            it "should push nothing on start dump" do
-              formatter.start_dump
-              expected_output = <<-OUT
-              ExampleGroup
-              OUT
-              io.string.should == expected_output.gsub(/^              /, '')
+            describe "#start_dump" do
+              it "should push nothing on start dump" do
+                formatter.start_dump
+                io.string.should == <<-OUT
+ExampleGroup
+OUT
+              end
             end
-          end
 
-          describe "#example_passed" do
-            it "should push passing spec name" do
-              formatter.example_passed(example_group.it("spec"))
-              expected_output = <<-OUT
-              ExampleGroup
-                spec
-              OUT
-              io.string.should == expected_output.gsub(/^              /, '')
+            describe "#example_passed" do
+              it "should push passing spec name" do
+                formatter.example_passed(example_group.it("spec"))
+                io.string.should == <<-OUT
+ExampleGroup
+  spec
+OUT
+              end
             end
-          end
 
-          describe "#example_pending" do
-            it "should push pending example name and message" do
-              formatter.example_pending(example_group.examples.first, 'reason')
-              expected_output = <<-OUT
-              ExampleGroup
-                example (PENDING: reason)
-              OUT
-              io.string.should == expected_output.gsub(/^              /, '')
-            end
+            describe "#example_pending" do
+              it "should push pending example name and message" do
+                formatter.example_pending(example_group.examples.first, 'reason', "#{__FILE__}:#{__LINE__}")
+                io.string.should == <<-OUT
+ExampleGroup
+  example (PENDING: reason)
+OUT
+              end
 
-            it "should dump pending" do
-              formatter.example_pending(example_group.examples.first, 'reason')
-              io.rewind
-              formatter.dump_pending
-              io.string.should =~ /Pending\:\nExampleGroup example \(reason\)\n/
+              it "should dump pending" do
+                formatter.example_pending(example_group.examples.first, 'reason', "#{__FILE__}:#{__LINE__}")
+                io.rewind
+                formatter.dump_pending
+                io.string.should =~ /Pending\:\n\nExampleGroup example \(reason\)\n/
+              end
             end
-          end
 
-          def have_single_level_example_group_output(expected_output)
-            expected = "ExampleGroup\n  #{expected_output}"
-            ::Spec::Matchers::SimpleMatcher.new(expected) do |actual|
-              actual == expected
+            def have_single_level_example_group_output(expected_output)
+              expected = "ExampleGroup\n  #{expected_output}"
+              ::Spec::Matchers::SimpleMatcher.new(expected) do |actual|
+                actual == expected
+              end
             end
           end
         end
       end
     end
   end
-end
+end
\ No newline at end of file

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_spec.rb Wed Dec 10 17:34:18 2008
@@ -29,7 +29,7 @@
             end
           end
           example = example_group.examples.first
-          @formatter.example_pending(example, "message")
+          @formatter.example_pending(example, "message", "#{__FILE__}:#{__LINE__}")
           @io.rewind
           @formatter.dump_summary(3, 2, 1, 1)
           @io.string.should eql(%Q|
@@ -88,15 +88,23 @@
 EOE
         end
         
-        it "should dump pending" do
+        it "should dump pending with file and line number" do
           example_group = ExampleGroup.describe("example_group") do
             specify "example" do
             end
           end
           example = example_group.examples.first
-          @formatter.example_pending(example, "message")
+          file = __FILE__
+          line = __LINE__ + 1
+          @formatter.example_pending(example, "message", "#{__FILE__}:#{__LINE__}")
           @formatter.dump_pending
-          @io.string.should =~ /Pending\:\nexample_group example \(message\)\n/
+          @io.string.should ==(<<-HERE)
+*
+Pending:
+
+example_group example (message)
+#{file}:#{line}
+HERE
         end
       end
       
@@ -106,11 +114,11 @@
           @options = mock('options')
           @out.stub!(:puts)
           @formatter = ProgressBarFormatter.new(@options, @out)
-          @formatter.class.send :public, :output_to_tty?
+          @formatter.class.__send__ :public, :output_to_tty?
         end
 
         after(:each) do
-          @formatter.class.send :protected, :output_to_tty?
+          @formatter.class.__send__ :protected, :output_to_tty?
         end
 
         it "should not throw NoMethodError on output_to_tty?" do

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb Wed Dec 10 17:34:18 2008
@@ -22,19 +22,19 @@
 
           Dir.chdir(root) do
             args = [
-              'failing_examples/mocking_example.rb',
-                'failing_examples/diffing_spec.rb',
-                'examples/pure/stubbing_example.rb',
-                'examples/pure/pending_example.rb',
+              'examples/failing/mocking_example.rb',
+                'examples/failing/diffing_spec.rb',
+                'examples/passing/stubbing_example.rb',
+                'examples/passing/pending_example.rb',
                 '--format',
                 'textmate',
                 opt
             ]
             err = StringIO.new
             out = StringIO.new
-            options = ::Spec::Runner::OptionParser.parse(args, err, out)
-            Spec::Runner::CommandLine.run(options)
 
+            run_with ::Spec::Runner::OptionParser.parse(args, err, out)
+              
             yield(out.string)
           end          
         end
@@ -44,7 +44,7 @@
         # describe TextMateFormatter, "functional spec file generator" do
         #   it "generates a new comparison file" do
         #     Dir.chdir(root) do
-        #       args = ['failing_examples/mocking_example.rb', 'failing_examples/diffing_spec.rb', 'examples/pure/stubbing_example.rb',  'examples/pure/pending_example.rb', '--format', 'textmate', '--diff']
+        #       args = ['examples/failing/mocking_example.rb', 'examples/failing/diffing_spec.rb', 'examples/passing/stubbing_example.rb',  'examples/passing/pending_example.rb', '--format', 'textmate', '--diff']
         #       err = StringIO.new
         #       out = StringIO.new
         #       Spec::Runner::CommandLine.run(

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/specdoc_formatter_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/specdoc_formatter_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/specdoc_formatter_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/specdoc_formatter_spec.rb Wed Dec 10 17:34:18 2008
@@ -5,150 +5,151 @@
   module Runner
     module Formatter
       describe SpecdocFormatter do
-        it_should_behave_like "sandboxed rspec_options"
-        attr_reader :io, :options, :formatter, :example_group
-        before(:each) do
-          @io = StringIO.new
-          options.stub!(:dry_run).and_return(false)
-          options.stub!(:colour).and_return(false)
-          @formatter = SpecdocFormatter.new(options, io)
-          @example_group = ::Spec::Example::ExampleGroup.describe("ExampleGroup") do
-            specify "example" do
+        with_sandboxed_options do
+          attr_reader :io, :formatter, :example_group
+          before(:each) do
+            @io = StringIO.new
+            options.stub!(:dry_run).and_return(false)
+            options.stub!(:colour).and_return(false)
+            @formatter = SpecdocFormatter.new(options, io)
+            @example_group = ::Spec::Example::ExampleGroup.describe("ExampleGroup") do
+              specify "example" do
+              end
             end
           end
-        end
 
-        describe "where ExampleGroup has no superclasss with a description" do
-          before do
-            add_example_group
-          end
-
-          def add_example_group
-            formatter.add_example_group(example_group)
-          end
+          describe "where ExampleGroup has no superclasss with a description" do
+            before do
+              add_example_group
+            end
 
-          describe "#dump_summary" do
-            it "should produce standard summary without pending when pending has a 0 count" do
-              formatter.dump_summary(3, 2, 1, 0)
-              io.string.should have_example_group_output("\nFinished in 3 seconds\n\n2 examples, 1 failure\n")
+            def add_example_group
+              formatter.add_example_group(example_group)
             end
 
-            it "should produce standard summary" do
-              formatter.dump_summary(3, 2, 1, 4)
-              io.string.should have_example_group_output("\nFinished in 3 seconds\n\n2 examples, 1 failure, 4 pending\n")
+            describe "#dump_summary" do
+              it "should produce standard summary without pending when pending has a 0 count" do
+                formatter.dump_summary(3, 2, 1, 0)
+                io.string.should have_example_group_output("\nFinished in 3 seconds\n\n2 examples, 1 failure\n")
+              end
+
+              it "should produce standard summary" do
+                formatter.dump_summary(3, 2, 1, 4)
+                io.string.should have_example_group_output("\nFinished in 3 seconds\n\n2 examples, 1 failure, 4 pending\n")
+              end
             end
-          end
 
-          describe "#add_example_group" do
-            it "should push ExampleGroup name" do
-              io.string.should eql("\nExampleGroup\n")
+            describe "#add_example_group" do
+              it "should push ExampleGroup name" do
+                io.string.should eql("\nExampleGroup\n")
+              end
             end
-          end
 
-          describe "#example_failed" do
-            describe "where ExampleGroup has no superclasss with a description" do
-              describe "when having an error" do
-                it "should push failing spec name and failure number" do
-                  formatter.example_failed(
-                    example_group.it("spec"),
-                    98,
-                    Reporter::Failure.new("c s", RuntimeError.new)
-                  )
-                  io.string.should have_example_group_output("- spec (ERROR - 98)\n")
+            describe "#example_failed" do
+              describe "where ExampleGroup has no superclasss with a description" do
+                describe "when having an error" do
+                  it "should push failing spec name and failure number" do
+                    formatter.example_failed(
+                      example_group.it("spec"),
+                      98,
+                      Reporter::Failure.new("c s", RuntimeError.new)
+                    )
+                    io.string.should have_example_group_output("- spec (ERROR - 98)\n")
+                  end
                 end
-              end
 
-              describe "when having an expectation failure" do
-                it "should push failing spec name and failure number" do
-                  formatter.example_failed(
-                    example_group.it("spec"),
-                    98,
-                    Reporter::Failure.new("c s", Spec::Expectations::ExpectationNotMetError.new)
-                  )
-                  io.string.should have_example_group_output("- spec (FAILED - 98)\n")
+                describe "when having an expectation failure" do
+                  it "should push failing spec name and failure number" do
+                    formatter.example_failed(
+                      example_group.it("spec"),
+                      98,
+                      Reporter::Failure.new("c s", Spec::Expectations::ExpectationNotMetError.new)
+                    )
+                    io.string.should have_example_group_output("- spec (FAILED - 98)\n")
+                  end
                 end
               end
-            end
 
-            describe "where ExampleGroup has two superclasses with a description" do
-              attr_reader :child_example_group, :grand_child_example_group
+              describe "where ExampleGroup has two superclasses with a description" do
+                attr_reader :child_example_group, :grand_child_example_group
               
-              def add_example_group
-                @child_example_group = Class.new(example_group).describe("Child ExampleGroup")
-                @grand_child_example_group = Class.new(child_example_group).describe("GrandChild ExampleGroup")
-                formatter.add_example_group(grand_child_example_group)
-              end
-
-              describe "when having an error" do
-                it "should push failing spec name and failure number" do
-                  formatter.example_failed(
-                  example_group.it("spec"),
-                  98,
-                  Reporter::Failure.new("c s", RuntimeError.new)
-                  )
-                  io.string.should have_nested_example_group_output("- spec (ERROR - 98)\n")
+                def add_example_group
+                  @child_example_group = Class.new(example_group).describe("Child ExampleGroup")
+                  @grand_child_example_group = Class.new(child_example_group).describe("GrandChild ExampleGroup")
+                  formatter.add_example_group(grand_child_example_group)
                 end
-              end
 
-              describe "when having an expectation" do
-                it "should push failing spec name and failure number" do
-                  formatter.example_failed(
+                describe "when having an error" do
+                  it "should push failing spec name and failure number" do
+                    formatter.example_failed(
                     example_group.it("spec"),
                     98,
-                    Reporter::Failure.new("c s", Spec::Expectations::ExpectationNotMetError.new)
-                  )
-                  io.string.should have_nested_example_group_output("- spec (FAILED - 98)\n")
+                    Reporter::Failure.new("c s", RuntimeError.new)
+                    )
+                    io.string.should have_nested_example_group_output("- spec (ERROR - 98)\n")
+                  end
                 end
-              end
 
-              def have_nested_example_group_output(expected_output)
-                expected_full_output = "\nExampleGroup Child ExampleGroup GrandChild ExampleGroup\n#{expected_output}"
-                ::Spec::Matchers::SimpleMatcher.new(expected_full_output) do |actual|
-                  actual == expected_full_output
+                describe "when having an expectation" do
+                  it "should push failing spec name and failure number" do
+                    formatter.example_failed(
+                      example_group.it("spec"),
+                      98,
+                      Reporter::Failure.new("c s", Spec::Expectations::ExpectationNotMetError.new)
+                    )
+                    io.string.should have_nested_example_group_output("- spec (FAILED - 98)\n")
+                  end
+                end
+
+                def have_nested_example_group_output(expected_output)
+                  expected_full_output = "\nExampleGroup Child ExampleGroup GrandChild ExampleGroup\n#{expected_output}"
+                  ::Spec::Matchers::SimpleMatcher.new(expected_full_output) do |actual|
+                    actual == expected_full_output
+                  end
                 end
               end
             end
-          end
 
-          describe "#start" do
-            it "should push nothing on start" do
-              formatter.start(5)
-              io.string.should have_example_group_output("")
+            describe "#start" do
+              it "should push nothing on start" do
+                formatter.start(5)
+                io.string.should have_example_group_output("")
+              end
             end
-          end
           
-          describe "#start_dump" do
-            it "should push nothing on start dump" do
-              formatter.start_dump
-              io.string.should have_example_group_output("")
+            describe "#start_dump" do
+              it "should push nothing on start dump" do
+                formatter.start_dump
+                io.string.should have_example_group_output("")
+              end
             end
-          end
 
-          describe "#example_passed" do
-            it "should push passing spec name" do
-              formatter.example_passed(example_group.it("spec"))
-              io.string.should have_example_group_output("- spec\n")
+            describe "#example_passed" do
+              it "should push passing spec name" do
+                formatter.example_passed(example_group.it("spec"))
+                io.string.should have_example_group_output("- spec\n")
+              end
             end
-          end
 
-          describe "#example_pending" do
-            it "should push pending example name and message" do
-              formatter.example_pending(example_group.examples.first, 'reason')
-              io.string.should have_example_group_output("- example (PENDING: reason)\n")
-            end
+            describe "#example_pending" do
+              it "should push pending example name and message" do
+                formatter.example_pending(example_group.examples.first, 'reason', "#{__FILE__}:#{__LINE__}")
+                io.string.should have_example_group_output("- example (PENDING: reason)\n")
+              end
 
-            it "should dump pending" do
-              formatter.example_pending(example_group.examples.first, 'reason')
-              io.rewind
-              formatter.dump_pending
-              io.string.should =~ /Pending\:\nExampleGroup example \(reason\)\n/
+              it "should dump pending" do
+                formatter.example_pending(example_group.examples.first, 'reason', "#{__FILE__}:#{__LINE__}")
+                io.rewind
+                formatter.dump_pending
+                io.string.should =~ /Pending\:\n\nExampleGroup example \(reason\)\n/
+              end
             end
-          end
 
-          def have_example_group_output(expected_output)
-            expected = "\nExampleGroup\n#{expected_output}"
-            ::Spec::Matchers::SimpleMatcher.new(expected) do |actual|
-              actual == expected
+            def have_example_group_output(expected_output)
+              expected = "\nExampleGroup\n#{expected_output}"
+              ::Spec::Matchers::SimpleMatcher.new(expected) do |actual|
+                actual == expected
+              end
             end
           end
         end



Mime
View raw message