You are viewing a plain text version of this content. The canonical link for it is here.
Posted to olio-commits@incubator.apache.org by ws...@apache.org on 2008/12/11 01:34:30 UTC

svn commit: r725524 [14/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...

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/story/html_formatter_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/story/html_formatter_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/story/html_formatter_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/story/html_formatter_spec.rb Wed Dec 10 17:34:18 2008
@@ -61,6 +61,54 @@
 EOF
           end
           
+          it 'should document additional givens using And' do
+            # when
+            @reporter.step_succeeded :given, 'step 1'
+            @reporter.step_succeeded :given, 'step 2'
+            @reporter.scenario_ended
+            @reporter.story_ended '', ''
+
+            # then
+            @out.string.should include("Given step 1")
+            @out.string.should include("And step 2")
+          end
+
+          it 'should document additional events using And' do
+            # when
+            @reporter.step_succeeded :when, 'step 1'
+            @reporter.step_succeeded :when, 'step 2'
+            @reporter.scenario_ended
+            @reporter.story_ended '', ''
+
+            # then
+            @out.string.should include("When step 1")
+            @out.string.should include("And step 2")
+          end
+
+          it 'should document additional outcomes using And' do
+            # when
+            @reporter.step_succeeded :then, 'step 1'
+            @reporter.step_succeeded :then, 'step 2'
+            @reporter.scenario_ended
+            @reporter.story_ended '', ''
+
+            # then
+            @out.string.should include("Then step 1")
+            @out.string.should include("And step 2")
+          end
+
+          it 'should document a GivenScenario followed by a Given using And' do
+            # when
+            @reporter.step_succeeded :'given scenario', 'a scenario'
+            @reporter.step_succeeded :given, 'a context'
+            @reporter.scenario_ended
+            @reporter.story_ended '', ''
+
+            # then
+            @out.string.should include("Given scenario a scenario")
+            @out.string.should include("And a context")
+          end
+          
           it "should create a failed story if one of its scenarios fails" do
               @reporter.story_started('story_title', 'narrative')
               @reporter.scenario_started('story_title', 'succeeded_scenario_name')

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb Wed Dec 10 17:34:18 2008
@@ -159,6 +159,45 @@
             @out.string.should include("3 scenarios: 1 succeeded, 1 failed, 1 pending")
           end
 
+          it 'should show test summary in red if there were failed scenarios' do
+            # when
+            @out.stub!(:tty?).and_return(true)
+            @options.stub!(:colour).and_return(true)
+
+            @formatter.scenario_started(nil, nil)
+            @formatter.scenario_failed('story', 'scenario', exception_from { raise RuntimeError, 'oops' })
+            @formatter.run_ended
+
+            # then
+            @out.string.should include("\e[31m scenarios: 0 succeeded, 1 failed, 0 pending\e[0m")
+          end
+
+          it 'should show test summary in yellow if there are pending scenarios' do
+            # when
+            @out.stub!(:tty?).and_return(true)
+            @options.stub!(:colour).and_return(true)
+
+            @formatter.scenario_started(nil, nil)
+            @formatter.scenario_pending('story', 'scenario', '')
+            @formatter.run_ended
+
+            # then
+            @out.string.should include("\e[32m scenarios: 0 succeeded, 0 failed, 1 pending\e[0m")
+          end
+
+          it 'should show test summary in green if all scenarios pass' do
+            # when
+            @out.stub!(:tty?).and_return(true)
+            @options.stub!(:colour).and_return(true)
+
+            @formatter.scenario_started(nil, nil)
+            @formatter.scenario_succeeded('story', 'scenario')
+            @formatter.run_ended
+
+            # then
+            @out.string.should include("\e[32m scenarios: 1 succeeded, 0 failed, 0 pending\e[0m")
+          end
+        
           it 'should produce details of the first failure each failed scenario when the run ends' do
             # when
             @formatter.run_started(3)
@@ -180,6 +219,19 @@
             @out.string.should include("RuntimeError: oops3")
           end
 
+          it 'should produce details of the failures in red when the run ends' do
+            # when
+            @out.stub!(:tty?).and_return(true)
+            @options.stub!(:colour).and_return(true)
+            @formatter.scenario_started(nil, nil)
+            @formatter.scenario_failed('story', 'scenario1', exception_from { raise RuntimeError, 'oops1' })
+            @formatter.run_ended
+
+            # then
+            @out.string.should =~ /\e\[31m[\n\s]*story \(scenario1\) FAILED\e\[0m/m
+            @out.string.should =~ /\e\[31m[\n\s]*RuntimeError: oops1\e\[0m/m
+          end
+
           it 'should produce details of each pending step when the run ends' do
             # when
             @formatter.run_started(2)

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/story/progress_bar_formatter_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/story/progress_bar_formatter_spec.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/story/progress_bar_formatter_spec.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/story/progress_bar_formatter_spec.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,82 @@
+require File.dirname(__FILE__) + '/../../../../spec_helper'
+require 'spec/runner/formatter/story/progress_bar_formatter'
+
+module Spec
+  module Runner
+    module Formatter
+      module Story
+        describe ProgressBarFormatter do
+          before :each do
+            # given
+            @out = StringIO.new
+            @out.stub!(:tty?).and_return(true)
+            @tweaker = mock('tweaker')
+            @tweaker.stub!(:tweak_backtrace)
+            @options = mock('options')
+            @options.stub!(:colour).and_return(true)
+            @options.stub!(:backtrace_tweaker).and_return(@tweaker)
+
+            @formatter = ProgressBarFormatter.new(@options, @out)
+          end
+
+          it 'should print some white space before test summary' do
+            #when
+            @formatter.run_started(1)
+            @formatter.run_ended
+
+            #then
+            @out.string.should =~ /^\n{2}/
+          end
+
+          it "should print how long tests took to complete" do
+            #when
+            now = Time.now
+            future = now+1
+            Time.stub!(:now).and_return(now)
+            @formatter.run_started(1)
+            Time.stub!(:now).and_return(future)
+            @formatter.run_ended
+
+            #then
+            @out.string.should include("Finished in %f seconds" % (future-now))
+          end
+
+
+          it "should push green dot for passing scenario" do
+            #when
+            @formatter.scenario_started('','')
+            @formatter.step_succeeded('', '')
+            @formatter.scenario_ended
+            @formatter.story_ended '', ''
+
+            #then
+            @out.string.should eql("\e[32m.\e[0m")
+          end
+
+          it "should push red F for failure scenario" do
+            #when
+            @formatter.scenario_started('','')
+            @formatter.step_failed('', '')
+            @formatter.scenario_failed('', '', '')
+            @formatter.story_ended '', ''
+
+            #then
+            @out.string.should eql("\e[31mF\e[0m")
+          end
+
+          it "should push yellow P for pending scenario" do
+            #when
+            @formatter.scenario_started('','')
+            @formatter.step_pending('', '')
+            @formatter.scenario_pending('story', '', '')
+            @formatter.story_ended '', ''
+
+            #then
+            @out.string.should eql("\e[33mP\e[0m")
+          end
+
+        end
+      end
+    end
+  end
+end

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatted-1.8.4.html
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_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/text_mate_formatted-1.8.4.html (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_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><a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/failing_examples/mocking_example.rb&line=13">./failing_examples/mocking_example.rb:13</a> 
+        <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/examples/failing/mocking_example.rb&line=13">./examples/failing/mocking_example.rb:13</a> 
 <a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=52">./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:52</a> 
 <a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=48">./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:48</a> </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><a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/failing_examples/mocking_example.rb&line=22">./failing_examples/mocking_example.rb:22</a> 
+        <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/examples/failing/mocking_example.rb&line=22">./examples/failing/mocking_example.rb:22</a> 
 <a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=52">./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:52</a> 
 <a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=48">./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:48</a> </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><a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/failing_examples/mocking_example.rb&line=28">./failing_examples/mocking_example.rb:28</a> 
+        <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/examples/failing/mocking_example.rb&line=28">./examples/failing/mocking_example.rb:28</a> 
 <a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=52">./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:52</a> 
 <a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=48">./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:48</a> </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><a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/failing_examples/mocking_example.rb&line=33">./failing_examples/mocking_example.rb:33</a> 
+        <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/examples/failing/mocking_example.rb&line=33">./examples/failing/mocking_example.rb:33</a> 
 <a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=52">./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:52</a> 
 <a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=48">./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:48</a> </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><a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/failing_examples/diffing_spec.rb&line=13">./failing_examples/diffing_spec.rb:13</a> 
+        <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/examples/failing/diffing_spec.rb&line=13">./examples/failing/diffing_spec.rb:13</a> 
 <a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=52">./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:52</a> 
 <a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=48">./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:48</a> </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><a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/failing_examples/diffing_spec.rb&line=34">./failing_examples/diffing_spec.rb:34</a> 
+        <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/examples/failing/diffing_spec.rb&line=34">./examples/failing/diffing_spec.rb:34</a> 
 <a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=52">./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:52</a> 
 <a href="txmt://open?url=file:///Users/aslakhellesoy/scm/rspec/trunk/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=48">./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:48</a> </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/text_mate_formatted-1.8.6.html
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_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/text_mate_formatted-1.8.6.html (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_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><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/failing_examples/mocking_example.rb&line=13">./failing_examples/mocking_example.rb:13</a> 
+        <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/examples/failing/mocking_example.rb&line=13">./examples/failing/mocking_example.rb:13</a> 
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=50">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:50</a> 
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=46">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:46</a> :in `chdir'
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=46">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:46</a> </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><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/failing_examples/mocking_example.rb&line=22">./failing_examples/mocking_example.rb:22</a> 
+        <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/examples/failing/mocking_example.rb&line=22">./examples/failing/mocking_example.rb:22</a> 
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=50">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:50</a> 
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=46">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:46</a> :in `chdir'
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=46">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:46</a> </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><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/failing_examples/mocking_example.rb&line=29">./failing_examples/mocking_example.rb:29</a> 
+        <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/examples/failing/mocking_example.rb&line=29">./examples/failing/mocking_example.rb:29</a> 
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=50">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:50</a> 
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=46">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:46</a> :in `chdir'
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=46">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:46</a> </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><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/failing_examples/mocking_example.rb&line=33">./failing_examples/mocking_example.rb:33</a> 
+        <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/examples/failing/mocking_example.rb&line=33">./examples/failing/mocking_example.rb:33</a> 
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=50">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:50</a> 
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=46">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:46</a> :in `chdir'
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=46">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:46</a> </pre></div>
@@ -265,7 +265,7 @@
 +behavior driven development
  framework for Ruby
 </pre></div>
-        <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/failing_examples/diffing_spec.rb&line=13">./failing_examples/diffing_spec.rb:13</a> 
+        <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/examples/failing/diffing_spec.rb&line=13">./examples/failing/diffing_spec.rb:13</a> 
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=50">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:50</a> 
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=46">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:46</a> :in `chdir'
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=46">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:46</a> </pre></div>
@@ -296,7 +296,7 @@
 +species=giraffe
  &gt;
 </pre></div>
-        <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/failing_examples/diffing_spec.rb&line=34">./failing_examples/diffing_spec.rb:34</a> 
+        <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/examples/failing/diffing_spec.rb&line=34">./examples/failing/diffing_spec.rb:34</a> 
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=50">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:50</a> 
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=46">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:46</a> :in `chdir'
 <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=46">/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:46</a> </pre></div>

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/heckle_runner_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/heckle_runner_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/heckle_runner_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/heckle_runner_spec.rb Wed Dec 10 17:34:18 2008
@@ -21,18 +21,18 @@
     end
 
     it "should heckle all methods in all classes in a module" do
-      @heckle_class.should_receive(:new).with("Foo::Bar", "one", rspec_options).and_return(@heckle)
-      @heckle_class.should_receive(:new).with("Foo::Bar", "two", rspec_options).and_return(@heckle)
-      @heckle_class.should_receive(:new).with("Foo::Zap", "three", rspec_options).and_return(@heckle)
-      @heckle_class.should_receive(:new).with("Foo::Zap", "four", rspec_options).and_return(@heckle)
+      @heckle_class.should_receive(:new).with("Foo::Bar", "one", Spec::Runner.options).and_return(@heckle)
+      @heckle_class.should_receive(:new).with("Foo::Bar", "two", Spec::Runner.options).and_return(@heckle)
+      @heckle_class.should_receive(:new).with("Foo::Zap", "three", Spec::Runner.options).and_return(@heckle)
+      @heckle_class.should_receive(:new).with("Foo::Zap", "four", Spec::Runner.options).and_return(@heckle)
 
       heckle_runner = Spec::Runner::HeckleRunner.new("Foo", @heckle_class)
       heckle_runner.heckle_with
     end
 
     it "should heckle all methods in a class" do
-      @heckle_class.should_receive(:new).with("Foo::Bar", "one", rspec_options).and_return(@heckle)
-      @heckle_class.should_receive(:new).with("Foo::Bar", "two", rspec_options).and_return(@heckle)
+      @heckle_class.should_receive(:new).with("Foo::Bar", "one", Spec::Runner.options).and_return(@heckle)
+      @heckle_class.should_receive(:new).with("Foo::Bar", "two", Spec::Runner.options).and_return(@heckle)
 
       heckle_runner = Spec::Runner::HeckleRunner.new("Foo::Bar", @heckle_class)
       heckle_runner.heckle_with
@@ -46,14 +46,14 @@
     end
 
     it "should heckle specific method in a class (with #)" do
-      @heckle_class.should_receive(:new).with("Foo::Bar", "two", rspec_options).and_return(@heckle)
+      @heckle_class.should_receive(:new).with("Foo::Bar", "two", Spec::Runner.options).and_return(@heckle)
 
       heckle_runner = Spec::Runner::HeckleRunner.new("Foo::Bar#two", @heckle_class)
       heckle_runner.heckle_with
     end
 
     it "should heckle specific method in a class (with .)" do
-      @heckle_class.should_receive(:new).with("Foo::Bar", "two", rspec_options).and_return(@heckle)
+      @heckle_class.should_receive(:new).with("Foo::Bar", "two", Spec::Runner.options).and_return(@heckle)
 
       heckle_runner = Spec::Runner::HeckleRunner.new("Foo::Bar.two", @heckle_class)
       heckle_runner.heckle_with

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/option_parser_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/option_parser_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/option_parser_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/option_parser_spec.rb Wed Dec 10 17:34:18 2008
@@ -1,6 +1,21 @@
 require File.dirname(__FILE__) + '/../../spec_helper.rb'
 require 'fileutils'
 
+module Custom
+  class ExampleGroupRunner
+    attr_reader :options, :arg
+    def initialize(options, arg)
+      @options, @arg = options, arg
+    end
+
+    def load_files(files)
+    end
+
+    def run
+    end
+  end  
+end
+
 describe "OptionParser" do
   before(:each) do
     @out = StringIO.new
@@ -13,6 +28,12 @@
     @parser.options
   end
   
+  it "should leave the submitted argv alone" do
+    args = ["--pattern", "foo"]
+    @parser.order!(args)
+    args.should == ["--pattern", "foo"]
+  end
+  
   it "should accept files to include" do
     options = parse(["--pattern", "foo"])
     options.filename_pattern.should == "foo"
@@ -51,12 +72,18 @@
     options.colour.should == false
   end
   
-  it "should print help to stdout if no args" do
-    pending 'A regression since 1.0.8' do
-      options = parse([])
-      @out.rewind
-      @out.read.should match(/Usage: spec \(FILE\|DIRECTORY\|GLOB\)\+ \[options\]/m)
-    end
+  it "should print help to stdout if no args and spec_comand?" do
+    Spec.stub!(:spec_command?).and_return(true)
+    options = parse([])
+    @out.rewind
+    @out.read.should match(/Usage: spec \(FILE\|DIRECTORY\|GLOB\)\+ \[options\]/m)
+  end
+    
+  it "should not print help to stdout if no args and NOT spec_command?" do
+    Spec.stub!(:spec_command?).and_return(false)
+    options = parse([])
+    @out.rewind
+    @out.read.should == ""
   end
   
   it "should print help to stdout" do
@@ -76,7 +103,7 @@
   it "should print version to stdout" do
     options = parse(["--version"])
     @out.rewind
-    @out.read.should match(/RSpec-\d+\.\d+\.\d+.*\(build \d+\) - BDD for Ruby\nhttp:\/\/rspec.rubyforge.org\/\n/n)
+    @out.read.should match(/rspec \d+\.\d+\.\d+/n)
   end
   
   it "should require file when require specified" do
@@ -231,19 +258,19 @@
   
   describe "when attempting a focussed spec" do
     attr_reader :file, :dir
-    before do
-      @original_rspec_options = $rspec_options
+    before(:each) do
+      @original_rspec_options = Spec::Runner.options
       @file = "#{File.dirname(__FILE__)}/spec_parser/spec_parser_fixture.rb"
       @dir = File.dirname(file)
     end
   
-    after do
-      $rspec_options = @original_rspec_options
+    after(:each) do
+      Spec::Runner.use @original_rspec_options
     end
   
     def parse(args)
       options = super
-      $rspec_options = options
+      Spec::Runner.use options
       options.filename_pattern = "*_fixture.rb"
       options
     end

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/options_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/options_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/options_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/options_spec.rb Wed Dec 10 17:34:18 2008
@@ -212,7 +212,7 @@
       describe "#load_class" do
         it "should raise error when not class name" do
           lambda do
-            @options.send(:load_class, 'foo', 'fruit', '--food')
+            @options.__send__(:load_class, 'foo', 'fruit', '--food')
           end.should raise_error('"foo" is not a valid class name')
         end
       end

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/output_one_time_fixture_runner.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/output_one_time_fixture_runner.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/output_one_time_fixture_runner.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/output_one_time_fixture_runner.rb Wed Dec 10 17:34:18 2008
@@ -1,7 +1,7 @@
 dir = File.dirname(__FILE__)
 require "#{dir}/../../spec_helper"
 
-triggering_double_output = rspec_options
+triggering_double_output = Spec::Runner.options
 options = Spec::Runner::OptionParser.parse(
   ["#{dir}/output_one_time_fixture.rb"], $stderr, $stdout
 )

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/quiet_backtrace_tweaker_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/quiet_backtrace_tweaker_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/quiet_backtrace_tweaker_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/quiet_backtrace_tweaker_spec.rb Wed Dec 10 17:34:18 2008
@@ -51,6 +51,12 @@
         @tweaker.tweak_backtrace(@error)
         @error.backtrace.should include("/a/b/c/d.rb")
       end
+
+      it "should gracefully handle backtraces with newlines" do
+        @error.set_backtrace(["we like\nbin/spec:\nnewlines"])
+        @tweaker.tweak_backtrace(@error)
+        @error.backtrace.should include("we like\nnewlines")
+      end
     end
   end
 end

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/reporter_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/reporter_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/reporter_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/reporter_spec.rb Wed Dec 10 17:34:18 2008
@@ -17,7 +17,7 @@
       end
 
       def failure
-        Mocks::DuckTypeArgConstraint.new(:header, :exception)
+        Mocks::ArgumentConstraints::DuckTypeConstraint.new(:header, :exception)
       end
 
       def create_example_group(description_text)
@@ -155,26 +155,72 @@
       end
 
       describe Reporter, "reporting one pending example (ExamplePendingError)" do
+        before :each do
+          @pending_error = Spec::Example::ExamplePendingError.new("reason")
+          @pending_caller = @pending_error.pending_caller
+        end
+        
         it "should tell formatter example is pending" do
           example = ExampleGroup.new("example")
-          formatter.should_receive(:example_pending).with(example, "reason")
+          formatter.should_receive(:example_pending).with(example, "reason", @pending_caller)
           formatter.should_receive(:add_example_group).with(example_group)
           reporter.add_example_group(example_group)
-          reporter.example_finished(example, Spec::Example::ExamplePendingError.new("reason"))
+          reporter.example_finished(example, @pending_error)
         end
 
         it "should account for pending example in stats" do
           example = ExampleGroup.new("example")
-          formatter.should_receive(:example_pending).with(example, "reason")
+          formatter.should_receive(:example_pending).with(example, "reason", @pending_caller)
           formatter.should_receive(:start_dump)
           formatter.should_receive(:dump_pending)
           formatter.should_receive(:dump_summary).with(anything(), 1, 0, 1)
           formatter.should_receive(:close).with(no_args)
           formatter.should_receive(:add_example_group).with(example_group)
           reporter.add_example_group(example_group)
-          reporter.example_finished(example, Spec::Example::ExamplePendingError.new("reason"))
+          reporter.example_finished(example, @pending_error)
           reporter.dump
         end
+        
+        describe "to formatters which have example_pending's arity of 2 (which is now deprecated)" do
+          before :each do
+            Kernel.stub!(:warn).with(Spec::Runner::Reporter::EXAMPLE_PENDING_DEPRECATION_WARNING)
+          
+            @deprecated_formatter = Class.new(@formatter.class) do
+              attr_reader :example_passed_to_method, :message_passed_to_method
+
+              def example_pending(example_passed_to_method, message_passed_to_method)
+                @example_passed_to_method = example_passed_to_method
+                @message_passed_to_method = message_passed_to_method
+              end
+            end.new(options, formatter_output)
+            
+            options.formatters << @deprecated_formatter
+          end
+          
+          it "should pass the correct example to the formatter" do
+            example = ExampleGroup.new("example")
+            reporter.add_example_group(example_group)
+            reporter.example_finished(example, @pending_error)
+            
+            (@deprecated_formatter.example_passed_to_method == example).should be_true
+          end
+          
+          it "should pass the correct pending error message to the formatter" do
+            example = ExampleGroup.new("example")
+            reporter.add_example_group(example_group)
+            reporter.example_finished(example, @pending_error)
+            
+            @deprecated_formatter.message_passed_to_method.should ==  @pending_error.message
+          end
+          
+          it "should raise a deprecation warning" do
+            Kernel.should_receive(:warn).with(Spec::Runner::Reporter::EXAMPLE_PENDING_DEPRECATION_WARNING)
+            
+            example = ExampleGroup.new("example")
+            reporter.add_example_group(example_group)
+            reporter.example_finished(example, @pending_error)
+          end
+        end
       end
 
       describe Reporter, "reporting one pending example (PendingExampleFixedError)" do

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/spec_parser_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/spec_parser_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/spec_parser_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/runner/spec_parser_spec.rb Wed Dec 10 17:34:18 2008
@@ -1,85 +1,91 @@
 require File.dirname(__FILE__) + '/../../spec_helper.rb'
 
 describe "SpecParser" do
-  attr_reader :parser, :file
-  before(:each) do
-    @original_rspec_options = $rspec_options
-    $rspec_options = ::Spec::Runner::Options.new(StringIO.new, StringIO.new)
-    @parser = Spec::Runner::SpecParser.new
-    @file = "#{File.dirname(__FILE__)}/spec_parser/spec_parser_fixture.rb"
-    load file
-  end
-
-  after do
-    $rspec_options = @original_rspec_options
-  end
-
-  it "should find spec name for 'specify' at same line" do
-    parser.spec_name_for(file, 5).should == "c 1"
-  end
-
-  it "should find spec name for 'specify' at end of spec line" do
-    parser.spec_name_for(file, 6).should == "c 1"
-  end
-
-  it "should find context for 'context' above all specs" do
-    parser.spec_name_for(file, 4).should == "c"
-  end
-
-  it "should find spec name for 'it' at same line" do
-    parser.spec_name_for(file, 15).should == "d 3"
-  end
-
-  it "should find spec name for 'it' at end of spec line" do
-    parser.spec_name_for(file, 16).should == "d 3"
-  end
-
-  it "should find context for 'describe' above all specs" do
-    parser.spec_name_for(file, 14).should == "d"
-  end
-
-  it "should find nearest example name between examples" do
-    parser.spec_name_for(file, 7).should == "c 1"
-  end
-
-  it "should find nothing outside a context" do
-    parser.spec_name_for(file, 2).should be_nil
-  end
-
-  it "should find context name for type" do
-    parser.spec_name_for(file, 26).should == "SpecParserSubject"
-  end
-
-  it "should find context and spec name for type" do
-    parser.spec_name_for(file, 28).should == "SpecParserSubject 5"
-  end
-
-  it "should find context and description for type" do
-    parser.spec_name_for(file, 33).should == "SpecParserSubject described"
-  end
-
-  it "should find context and description and example for type" do
-    parser.spec_name_for(file, 36).should == "SpecParserSubject described 6"
-  end
+  with_sandboxed_options do    
+    attr_reader :parser, :file
+    
+    before do
+      @parser = Spec::Runner::SpecParser.new
+      @file = "#{File.dirname(__FILE__)}/spec_parser/spec_parser_fixture.rb"
+      load file
+    end
+
+    it "should find spec name for 'specify' at same line" do
+      parser.spec_name_for(file, 5).should == "c 1"
+    end
+
+    it "should find spec name for 'specify' at end of spec line" do
+      parser.spec_name_for(file, 6).should == "c 1"
+    end
+
+    it "should find context for 'context' above all specs" do
+      parser.spec_name_for(file, 4).should == "c"
+    end
+
+    it "should find spec name for 'it' at same line" do
+      parser.spec_name_for(file, 15).should == "d 3"
+    end
+
+    it "should find spec name for 'it' at end of spec line" do
+      parser.spec_name_for(file, 16).should == "d 3"
+    end
+
+    it "should find context for 'describe' above all specs" do
+      parser.spec_name_for(file, 14).should == "d"
+    end
+
+    it "should find nearest example name between examples" do
+      parser.spec_name_for(file, 7).should == "c 1"
+    end
+
+    it "should find nothing outside a context" do
+      parser.spec_name_for(file, 2).should be_nil
+    end
+
+    it "should find context name for type" do
+      parser.spec_name_for(file, 26).should == "SpecParserSubject"
+    end
+
+    it "should find context and spec name for type" do
+      parser.spec_name_for(file, 28).should == "SpecParserSubject 5"
+    end
+
+    it "should find context and description for type" do
+      parser.spec_name_for(file, 33).should == "SpecParserSubject described"
+    end
+
+    it "should find context and description and example for type" do
+      parser.spec_name_for(file, 36).should == "SpecParserSubject described 6"
+    end
+
+    it "should find context and description for type with modifications" do
+      parser.spec_name_for(file, 40).should == "SpecParserSubject described"
+    end
+
+    it "should find context and described and example for type with modifications" do
+      parser.spec_name_for(file, 43).should == "SpecParserSubject described 7"
+    end
+
+    it "should find example group" do
+      parser.spec_name_for(file, 47).should == "described"
+    end
+
+    it "should find example" do
+      parser.spec_name_for(file, 50).should == "described 8"
+    end
+
+    it "should find nested example" do
+      parser.spec_name_for(file, 63).should == "e f 11"
+    end
+
+    it "should handle paths which contain colons" do
+      fixture =
+         { "c:/somepath/somefile.rb:999:in 'method'" => "c:/somepath/somefile.rb",
+           "./somepath/somefile:999"                 => "./somepath/somefile" }
+      fixture.each_pair do |input, expected|
+        parser.send(:parse_backtrace, input ).should == [[expected, 999]]
+      end
+    end
 
-  it "should find context and description for type with modifications" do
-    parser.spec_name_for(file, 40).should == "SpecParserSubject described"
   end
-
-  it "should find context and described and example for type with modifications" do
-    parser.spec_name_for(file, 43).should == "SpecParserSubject described 7"
-  end
-
-  it "should find example group" do
-    parser.spec_name_for(file, 47).should == "described"
-  end
-
-  it "should find example" do
-    parser.spec_name_for(file, 50).should == "described 8"
-  end
-
-  it "should find nested example" do
-    parser.spec_name_for(file, 63).should == "e f 11"
-  end
-
 end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/spec_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/spec_spec.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/spec_spec.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/spec_spec.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,21 @@
+require File.dirname(__FILE__) + '/../spec_helper.rb'
+
+describe Spec, "#exit?" do
+  describe "when ::Test is absent during loading but present when running exit?" do
+    # believe it or not, this can happen when ActiveSupport is loaded after RSpec is, 
+    # since it loads active_support/core_ext/test/unit/assertions.rb which defines
+    # Test::Unit but doesn't actually load test/unit
+
+    before(:each) do
+      Object.const_set(:Test, Module.new)
+    end
+    
+    it "does not attempt to access the non-loaded test/unit library" do
+      lambda { Spec.exit? }.should_not raise_error
+    end
+    
+    after(:each) do
+      Object.send(:remove_const, :Test)
+    end
+  end
+end

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/runner/plain_text_story_runner_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/runner/plain_text_story_runner_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/runner/plain_text_story_runner_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/runner/plain_text_story_runner_spec.rb Wed Dec 10 17:34:18 2008
@@ -22,11 +22,8 @@
         
         it "should parse a story file" do
           runner = PlainTextStoryRunner.new("path")
-          during {
-            runner.run(mock('runner'))
-          }.expect {
-            @parser.should_receive(:parse).with(["this", "and that"])
-          }
+          @parser.should_receive(:parse).with(["this", "and that"])
+          runner.run(mock('runner'))
         end
         
         it "should build up a mediator with its own steps and the singleton story_runner" do

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/runner/story_runner_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/runner/story_runner_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/runner/story_runner_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/runner/story_runner_spec.rb Wed Dec 10 17:34:18 2008
@@ -235,13 +235,13 @@
         it 'should find a scenario in the current story by name' do
           # given
           story_runner = StoryRunner.new(ScenarioRunner.new)
-          $scenario = nil
+          scenario = nil
           
           story_runner.Story 'title', 'narrative' do
             Scenario 'first scenario' do
             end
             Scenario 'second scenario' do
-              $scenario = StoryRunner.scenario_from_current_story 'first scenario'
+              scenario = StoryRunner.scenario_from_current_story 'first scenario'
             end
           end
           
@@ -249,7 +249,7 @@
           story_runner.run_stories
           
           # then
-          $scenario.name.should == 'first scenario'
+          scenario.name.should == 'first scenario'
         end
         
         it "should clean the steps between stories" do

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/scenario_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/scenario_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/scenario_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/scenario_spec.rb Wed Dec 10 17:34:18 2008
@@ -8,9 +8,7 @@
         story = StoryBuilder.new.to_story
         
         # when
-        error = exception_from do
-          Scenario.new story, 'name'
-        end
+        error = exception_from { Scenario.new story, 'name' }
         
         # then
         error.should be_nil

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/step_mother_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/step_mother_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/step_mother_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/step_mother_spec.rb Wed Dec 10 17:34:18 2008
@@ -42,6 +42,18 @@
         end.should raise_error(Spec::Example::ExamplePendingError, /Unimplemented/)
       end
       
+      it "should create a default step with it's name stripped" do
+        # given
+        step_mother = StepMother.new
+        
+        # when
+        step = step_mother.find(:given, "doesn't exist\n\n")
+        
+        # then
+        step.should be_an_instance_of(Step)
+        step.name.should == "doesn't exist"
+      end
+      
       it 'should clear itself' do
         # given
         step_mother = StepMother.new

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/step_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/step_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/step_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/step_spec.rb Wed Dec 10 17:34:18 2008
@@ -2,12 +2,17 @@
 
 module Spec
   module Story
-    describe Step, "matching" do
+    describe Step, "#matching" do
       it "should match a text string" do
         step = Step.new("this text") {}
         step.matches?("this text").should be_true
       end
       
+      it "should match a text string that has additional line returns" do
+        step = Step.new("this text") {}
+        step.matches?("this text\n\n").should be_true
+      end
+      
       it "should not match a text string that does not start the same" do
         step = Step.new("this text") {}
         step.matches?("Xthis text").should be_false
@@ -32,6 +37,11 @@
         step = Step.new("1 $one 2 $two 3 $three 4") {}
         step.matches?("1 a 2 b 3 c 4").should be_true
       end
+
+      it "should match a text string with two params sharing a prefix" do
+        step = Step.new("I am cool $n times out of $n_total")
+        step.matches?("I am cool 3 times out of 7").should be_true
+      end
       
       it "should match a text string with a param at the beginning" do
         step = Step.new("$one 2 3") {}
@@ -128,7 +138,7 @@
       end
       
       it "should match a multiline regex" do
-        step = Step.new(/.* should have text.$text/) {}
+        step = Step.new(/.*should have text.$text/) {}
         step.matches?(<<TEXT).should be_true
           should have text
           this is the text
@@ -153,6 +163,18 @@
       end
     end
     
+    describe Step, "#parse_args" do
+      it "should return an empty array for a text string with no parameters" do
+        step = Step.new("this text") {}
+        step.parse_args("this text").should == []
+      end
+      
+      it "should return an empty array for a text string with additional line returns and no parameters" do
+        step = Step.new("this text") {}
+        step.parse_args("this text\n\n").should == []
+      end
+    end
+    
     describe Step do
       it "should be pending with no block" do
         step = Step.new("foo")

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/story_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/story_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/story_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/story_spec.rb Wed Dec 10 17:34:18 2008
@@ -20,9 +20,7 @@
       
       it 'should not raise an error if no block is supplied' do
         # when
-        error = exception_from do
-          Story.new 'title', 'narrative'
-        end
+        error = exception_from { Story.new 'title', 'narrative' }
         
         # then
         error.should be_nil

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/world_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/world_spec.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/world_spec.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec/story/world_spec.rb Wed Dec 10 17:34:18 2008
@@ -347,10 +347,10 @@
 
       it 'should suppress listeners while it runs a GivenScenario' do
         # given
-        $scenario_ran = false
+        scenario_ran = false
 
         scenario = ScenarioBuilder.new.name('a scenario').to_scenario do
-          $scenario_ran = true
+          scenario_ran = true
           Given 'given' do end
           When 'event' do end
           Then 'outcome' do end
@@ -374,16 +374,16 @@
         world.GivenScenario 'a scenario'
 
         # then
-        $scenario_ran.should be_true
+        scenario_ran.should be_true
       end
 
       it 'should interpret GivenScenario... And... as multiple givens' do
         # given
         world = World.create
-        $steps = []
+        steps = []
 
         scenario = ScenarioBuilder.new.name('a scenario').to_scenario do
-          $steps << 1
+          steps << 1
         end
         Runner::StoryRunner.should_receive(:scenario_from_current_story).
           with('a scenario').and_return(scenario)
@@ -392,12 +392,12 @@
         world.instance_eval do
           GivenScenario 'a scenario'
           And 'step 2' do
-            $steps << 2
+            steps << 2
           end
         end
 
         # then
-        $steps.should == [1,2]
+        steps.should == [1,2]
         World.step_mother.find(:given, 'step 2').should_not be_nil
       end
 

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec_helper.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec_helper.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec_helper.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/spec/spec_helper.rb Wed Dec 10 17:34:18 2008
@@ -12,7 +12,11 @@
 require spec_classes_path unless $LOAD_PATH.include?(spec_classes_path)
 require File.dirname(__FILE__) + '/../lib/spec/expectations/differs/default'
 
-module Spec
+module Spec  
+  module Example
+    class NonStandardError < Exception; end
+  end
+
   module Matchers
     def fail
       raise_error(Spec::Expectations::ExpectationNotMetError)
@@ -22,82 +26,56 @@
       raise_error(Spec::Expectations::ExpectationNotMetError, message)
     end
 
-    class Pass
-      def matches?(proc, &block)
-        begin
-          proc.call
-          true
-        rescue Exception => @error
-          false
-        end
-      end
-
-      def failure_message
-        @error.message + "\n" + @error.backtrace.join("\n")
-      end
-    end
-
-    def pass
-      Pass.new
-    end
-    
-    class CorrectlyOrderedMockExpectation
-      def initialize(&event)
-        @event = event
-      end
-      
-      def expect(&expectations)
-        expectations.call
-        @event.call
+    def exception_from(&block)
+      exception = nil
+      begin
+        yield
+      rescue StandardError => e
+        exception = e
       end
+      exception
     end
     
-    def during(&block)
-      CorrectlyOrderedMockExpectation.new(&block) 
-    end
-  end
-end
-
-class NonStandardError < Exception; end
-
-module Custom
-  class ExampleGroupRunner
-    attr_reader :options, :arg
-    def initialize(options, arg)
-      @options, @arg = options, arg
+    def run_with(options)
+      ::Spec::Runner::CommandLine.run(options)
     end
 
-    def load_files(files)
+    def with_ruby(version)
+      yield if RUBY_PLATFORM =~ Regexp.compile("^#{version}")
     end
-
-    def run
-    end
-  end  
-end
-
-def exception_from(&block)
-  exception = nil
-  begin
-    yield
-  rescue StandardError => e
-    exception = e
   end
-  exception
 end
 
-describe "sandboxed rspec_options", :shared => true do
+def with_sandboxed_options
   attr_reader :options
+  
+  before(:each) do
+    @original_rspec_options = ::Spec::Runner.options
+    ::Spec::Runner.use(@options = ::Spec::Runner::Options.new(StringIO.new, StringIO.new))
+  end
 
-  before(:all) do
-    @original_rspec_options = $rspec_options
+  after(:each) do
+    ::Spec::Runner.use(@original_rspec_options)
   end
+  
+  yield
+end
 
+def with_sandboxed_config
+  attr_reader :config
+  
   before(:each) do
-    @options = ::Spec::Runner::Options.new(StringIO.new, StringIO.new)
-    $rspec_options = options
+    @config = ::Spec::Example::Configuration.new
+    @original_configuration = ::Spec::Runner.configuration
+    spec_configuration = @config
+    ::Spec::Runner.instance_eval {@configuration = spec_configuration}
   end
-
-  after do
-    $rspec_options = @original_rspec_options
+  
+  after(:each) do
+    original_configuration = @original_configuration
+    ::Spec::Runner.instance_eval {@configuration = original_configuration}
+    ::Spec::Example::ExampleGroupFactory.reset
   end
-end
\ No newline at end of file
+  
+  yield
+end

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/all.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/all.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/all.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/all.rb Wed Dec 10 17:34:18 2008
@@ -1,5 +1,5 @@
 require File.join(File.dirname(__FILE__), *%w[helper])
 
-%w[example_groups interop mock_framework_integration stories].each do |dir|
+%w[configuration example_groups interop mock_framework_integration stories].each do |dir|
   require File.join(File.dirname(__FILE__), "#{dir}/stories")
 end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/configuration/before_blocks.story
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/configuration/before_blocks.story?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/configuration/before_blocks.story (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/configuration/before_blocks.story Wed Dec 10 17:34:18 2008
@@ -0,0 +1,21 @@
+Story: before suite
+	As a developer using rspec
+	I want to define before blocks in the global configuration
+	So that I can define global things globally
+	
+	Scenario: running with ruby
+	
+		Given the file ../resources/spec/before_blocks_example.rb
+		
+    When I run it with the ruby interpreter
+
+		Then the stdout should match "3 examples, 0 failures"
+		
+	Scenario: running with spec
+
+		Given the file ../resources/spec/before_blocks_example.rb
+
+    When I run it with the spec script
+
+		Then the stdout should match "3 examples, 0 failures"
+					
\ No newline at end of file

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/configuration/stories.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/configuration/stories.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/configuration/stories.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/configuration/stories.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,7 @@
+require File.join(File.dirname(__FILE__), *%w[.. helper])
+
+with_steps_for :running_rspec do
+  Dir["#{File.dirname(__FILE__)}/*"].each do |file|
+    run file if File.file?(file) && !(file =~ /\.rb$/)
+  end
+end
\ No newline at end of file

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/example_groups/autogenerated_docstrings
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/example_groups/autogenerated_docstrings?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/example_groups/autogenerated_docstrings (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/example_groups/autogenerated_docstrings Wed Dec 10 17:34:18 2008
@@ -5,41 +5,41 @@
   So that I can reduce duplication between example names and example code
 
   Scenario: run passing examples with ruby
-    Given the file ../../examples/pure/autogenerated_docstrings_example.rb
+    Given the file ../../examples/passing/autogenerated_docstrings_example.rb
 
     When I run it with the ruby interpreter -fs
 
     Then the stdout should match /should equal 5/
     And the stdout should match /should be < 5/
     And the stdout should match /should include "a"/
-    And the stdout should match /should respond to #size/
+    And the stdout should match /should respond to \[:size\]/
 
   Scenario: run failing examples with ruby
-    Given the file ../../failing_examples/failing_autogenerated_docstrings_example.rb
+    Given the file ../../examples/failing/failing_autogenerated_docstrings_example.rb
 
     When I run it with the ruby interpreter -fs
 
     Then the stdout should match /should equal 2/
     And the stdout should match /should be > 5/
     And the stdout should match /should include "b"/
-    And the stdout should match /should not respond to #size/
+    And the stdout should match /should not respond to \[:size\]/
 
   Scenario: run passing examples with spec
-    Given the file ../../examples/pure/autogenerated_docstrings_example.rb
+    Given the file ../../examples/passing/autogenerated_docstrings_example.rb
 
     When I run it with the spec script -fs
 
     Then the stdout should match /should equal 5/
     And the stdout should match /should be < 5/
     And the stdout should match /should include "a"/
-    And the stdout should match /should respond to #size/
+    And the stdout should match /should respond to \[:size\]/
 
   Scenario: run failing examples with spec
-    Given the file ../../failing_examples/failing_autogenerated_docstrings_example.rb
+    Given the file ../../examples/failing/failing_autogenerated_docstrings_example.rb
 
     When I run it with the spec script -fs
 
     Then the stdout should match /should equal 2/
     And the stdout should match /should be > 5/
     And the stdout should match /should include "b"/
-    And the stdout should match /should not respond to #size/
+    And the stdout should match /should not respond to \[:size\]/

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/example_groups/nested_groups
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/example_groups/nested_groups?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/example_groups/nested_groups (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/example_groups/nested_groups Wed Dec 10 17:34:18 2008
@@ -5,13 +5,13 @@
   So that I can better organize my examples
 
   Scenario: Run with ruby
-    Given the file ../../examples/pure/stack_spec_with_nested_example_groups.rb
+    Given the file ../../examples/passing/stack_spec_with_nested_example_groups.rb
     When I run it with the ruby interpreter -fs
     Then the stdout should match /Stack \(empty\)/
     And the stdout should match /Stack \(full\)/
 
   Scenario: Run with ruby
-    Given the file ../../examples/pure/stack_spec_with_nested_example_groups.rb
+    Given the file ../../examples/passing/stack_spec_with_nested_example_groups.rb
     When I run it with the spec script -fs
     Then the stdout should match /Stack \(empty\)/
     And the stdout should match /Stack \(full\)/

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/interop/test_but_not_test_unit
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/interop/test_but_not_test_unit?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/interop/test_but_not_test_unit (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/interop/test_but_not_test_unit Wed Dec 10 17:34:18 2008
@@ -0,0 +1,14 @@
+Story: Test is defined, but not Test::Unit
+
+  As an RSpec user who has my own library named Test (but not Test::Unit)
+  I want to run examples without getting Test::Unit NameErrors
+
+  Scenario: Run with ruby
+    Given the file test/spec_including_test_but_not_unit.rb
+    When I run it with the ruby interpreter
+    Then the stderr should not match "Test::Unit"
+
+  Scenario: Run with spec
+    Given the file test/spec_including_test_but_not_unit.rb
+    When I run it with the spec script
+    Then the stderr should not match "Test::Unit"

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/mock_framework_integration/use_flexmock.story
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/mock_framework_integration/use_flexmock.story?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/mock_framework_integration/use_flexmock.story (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/mock_framework_integration/use_flexmock.story Wed Dec 10 17:34:18 2008
@@ -1,4 +1,4 @@
-Story: Getting correct output
+Story: Getting correct output with flexmock
 
   As an RSpec user who prefers flexmock
   I want to be able to use flexmock without rspec mocks interfering

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/resources/helpers/story_helper.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/resources/helpers/story_helper.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/resources/helpers/story_helper.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/resources/helpers/story_helper.rb Wed Dec 10 17:34:18 2008
@@ -12,5 +12,5 @@
     ruby("#{File.dirname(__FILE__) + '/../../resources/helpers/cmdline.rb'} #{args}", stderr)
   end
   
-  Spec::Story::World.send :include, self
+  Spec::Story::World.__send__ :include, self
 end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/resources/spec/before_blocks_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/resources/spec/before_blocks_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/resources/spec/before_blocks_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/resources/spec/before_blocks_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,32 @@
+$:.unshift File.join(File.dirname(__FILE__), *%w[.. .. .. lib])
+require 'spec'
+
+Spec::Runner.configure do |config|
+  config.before(:suite) do
+    $before_suite = "before suite"
+  end
+  config.before(:each) do
+    @before_each = "before each"
+  end
+  config.before(:all) do
+    @before_all = "before all"
+  end
+end
+
+describe "stuff in before blocks" do
+  describe "with :suite" do
+    it "should be available in the example" do
+      $before_suite.should == "before suite"
+    end
+  end
+  describe "with :all" do
+    it "should be available in the example" do
+      @before_all.should == "before all"
+    end
+  end
+  describe "with :each" do
+    it "should be available in the example" do
+      @before_each.should == "before each"
+    end
+  end
+end
\ No newline at end of file

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/resources/test/spec_including_test_but_not_unit.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/resources/test/spec_including_test_but_not_unit.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/resources/test/spec_including_test_but_not_unit.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/stories/resources/test/spec_including_test_but_not_unit.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,11 @@
+$:.push File.join(File.dirname(__FILE__), *%w[.. .. .. lib])
+require 'spec'
+
+module Test
+end
+
+describe "description" do
+  it "should description" do
+    1.should == 1
+  end
+end
\ No newline at end of file

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/story_server/prototype/javascripts/prototype.js
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/story_server/prototype/javascripts/prototype.js?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/story_server/prototype/javascripts/prototype.js (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/story_server/prototype/javascripts/prototype.js Wed Dec 10 17:34:18 2008
@@ -1242,7 +1242,7 @@
       this.setRequestHeaders();
 
       this.body = this.method == 'post' ? (this.options.postBody || params) : null;
-      this.transport.send(this.body);
+      this.transport.__send__(this.body);
 
       /* Force Firefox to handle ready state 4 for synchronous requests */
       if (!this.options.asynchronous && this.transport.overrideMimeType)