<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/spec/integration/example/integration_example_group.rb</filename>
    </added>
    <added>
      <filename>spec/application_controller.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,10 +1,12 @@
-require File.expand_path(File.dirname(__FILE__) + '/testing/plugit_descriptor')
+$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
 
-require 'rake/rdoctask'
-Rake::RDocTask.new(:doc) do |r|
-  r.title = &quot;Rails Scenarios Plugin&quot;
-  r.main = &quot;README&quot;
-  r.options &lt;&lt; &quot;--line-numbers&quot;
-  r.rdoc_files.include(&quot;README&quot;, &quot;LICENSE&quot;, &quot;lib/**/*.rb&quot;)
-  r.rdoc_dir = &quot;doc&quot;
+require 'rubygems'
+require 'spec/rake/spectask'
+
+task :default =&gt; :spec
+
+desc &quot;Run all specs&quot;
+Spec::Rake::SpecTask.new do |t|
+  t.spec_files = FileList['spec/**/*_spec.rb']
+  t.spec_opts = ['--options', 'spec/spec.opts']
 end
\ No newline at end of file</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,7 @@ require 'spec/rails'
 require 'spec/integration/extensions'
 require 'spec/integration/matchers'
 require 'spec/integration/dsl'
+require 'spec/integration/example/integration_example_group'
 
 module Spec # :nodoc:
   module Integration # :nodoc:</diff>
      <filename>lib/spec/integration.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,5 @@
-Dir[File.dirname(__FILE__) + '/dsl/extensions/*.rb'].each { |f| require f }
-require File.dirname(__FILE__) + '/dsl/navigation'
-require File.dirname(__FILE__) + '/dsl/form'
-require File.dirname(__FILE__) + '/dsl/integration_example_group'
+require 'spec/integration/dsl/navigation'
+require 'spec/integration/dsl/form'
 
 module Spec
   module Integration</diff>
      <filename>lib/spec/integration/dsl.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,155 +2,153 @@ module Spec
   module Integration
     module DSL
 
-      module FormExampleMethods
-        # Makes assertions about the existance and validity of a form.
-        # The _selector_ argument may be
-        # &lt;tt&gt;a Symbol or String that is the form id&lt;/tt&gt;
-        # &lt;tt&gt;a String that is a valid CSS selector&lt;/tt&gt;
-        #
-        def sees_form(selector, values, options = {})
-          options = {
-            :verify_field_enablment =&gt; false,
-            :verify_field_values =&gt; true
-          }.merge(options)
-          
-          selector = selector.to_s
-          forms, tried_selector = nil, false
-          forms = css_select &quot;form##{selector}&quot; if selector =~ /^[a-zA-Z_\-0-9]+$/
-          if forms.blank?
-            tried_selector = true
-            forms = css_select selector
-          end
+      # Makes assertions about the existance and validity of a form.
+      # The _selector_ argument may be
+      # &lt;tt&gt;a Symbol or String that is the form id&lt;/tt&gt;
+      # &lt;tt&gt;a String that is a valid CSS selector&lt;/tt&gt;
+      #
+      def sees_form(selector, values, options = {})
+        options = {
+          :verify_field_enablment =&gt; false,
+          :verify_field_values =&gt; true
+        }.merge(options)
+        
+        selector = selector.to_s
+        forms, tried_selector = nil, false
+        forms = css_select &quot;form##{selector}&quot; if selector =~ /^[a-zA-Z_\-0-9]+$/
+        if forms.blank?
+          tried_selector = true
+          forms = css_select selector
+        end
 
-          violated &quot;Found no form having id or matching selector '#{selector}'&quot; if forms.blank?
-          if forms.size &gt; 1
-            violated &quot;Found more than one form having id ##{selector}&quot; if !tried_selector
-            violated &quot;Found more than one form matching selector '#{selector}'&quot;
-          end
+        violated &quot;Found no form having id or matching selector '#{selector}'&quot; if forms.blank?
+        if forms.size &gt; 1
+          violated &quot;Found more than one form having id ##{selector}&quot; if !tried_selector
+          violated &quot;Found more than one form matching selector '#{selector}'&quot;
+        end
 
-          form = forms[0]
-          values.to_fields.each do |name, value|
-            form_fields = css_select form, &quot;input, select, textarea&quot;
-            matching_field = form_fields.detect {|field| field[&quot;name&quot;] == name || field[&quot;name&quot;] == &quot;#{name}[]&quot;}
-            violated &quot;Could not find a form field having the name '#{name}'&quot; unless matching_field
-            if options[:verify_field_values]
-              matching_field[&quot;value&quot;].should == value
-            end
-            if options[:verify_field_enablment] &amp;&amp; matching_field[&quot;disabled&quot;]
-              violated &quot;Form '#{selector}' has a field named '#{name}', but it is disabled. You may not submit values to it.&quot;
-            end
-            if matching_field[&quot;type&quot;] == &quot;file&quot; &amp;&amp; form[&quot;enctype&quot;] != &quot;multipart/form-data&quot;
-              violated &quot;Form '#{selector}' has a file field named '#{name}', but the enctype is not multipart/form-data&quot;
-            end
-            if matching_field.name == &quot;select&quot;
-              should have_tag(matching_field, &quot;option[value=#{value}]&quot;)
-            end
+        form = forms[0]
+        values.to_fields.each do |name, value|
+          form_fields = css_select form, &quot;input, select, textarea&quot;
+          matching_field = form_fields.detect {|field| field[&quot;name&quot;] == name || field[&quot;name&quot;] == &quot;#{name}[]&quot;}
+          violated &quot;Could not find a form field having the name '#{name}'&quot; unless matching_field
+          if options[:verify_field_values]
+            matching_field[&quot;value&quot;].should == value
+          end
+          if options[:verify_field_enablment] &amp;&amp; matching_field[&quot;disabled&quot;]
+            violated &quot;Form '#{selector}' has a field named '#{name}', but it is disabled. You may not submit values to it.&quot;
+          end
+          if matching_field[&quot;type&quot;] == &quot;file&quot; &amp;&amp; form[&quot;enctype&quot;] != &quot;multipart/form-data&quot;
+            violated &quot;Form '#{selector}' has a file field named '#{name}', but the enctype is not multipart/form-data&quot;
+          end
+          if matching_field.name == &quot;select&quot;
+            should have_tag(matching_field, &quot;option[value=#{value}]&quot;)
           end
-          form
         end
+        form
+      end
 
-        # Submit a form to the application after verifying it exists in the
-        # current response body.
-        #
-        # If you are looking to use an alternate HTTP method, realize that the
-        # intention is that you would generate your form appropriately to
-        # include the hidden _method field. This will be handled by adding
-        # that value to your form fields.
-        #
-        # Other hidden fields will also be added
-        # unless you pass the option &lt;tt&gt;:include_hidden&lt;/tt&gt; with the value
-        # false. You may find this necessary when you have Arrays of Hashes -
-        # they are sufficiently too complex to handle correctly in the
-        # conversion to request parameters, merged with hiddens, and converted
-        # back to the expected data structure.
-        #
-        # This method supports a couple of argument sequences:
-        #
-        #   submit_form(selector = 'form', values = {}, options = {})
-        #   submit_form(values = {}, options = {})
-        #
-        # The former allows you to specify which form to submit when there are
-        # multiple forms on a page. _selector_ may be the id of the form or a
-        # valid CSS selector.
-        #
-        # The latter allows you to assume that there is only one form on the
-        # page. It essentially defaults selector to the CSS selector 'form'.
-        # Note that to pass options, you will need to use parens, as in:
-        #
-        #   submit_form({}, :include_hidden =&gt; false)
-        #
-        # You CAN use ActionController::TestUploadFile's as parameters, thanks
-        # to some work done by RubyRedRick!
-        #
-        # Supported options are:
-        #
-        # * &lt;tt&gt;:include_hidden&lt;/tt&gt; - defaults to true. Hidden fields will be
-        #   included into your supplied params.
-        # * &lt;tt&gt;:verify_field_enablment&lt;/tt&gt; - will fail submission if a field
-        #   is disabled. Default is true.
-        # * &lt;tt&gt;:verify_field_values&lt;/tt&gt; - will fail submission if a field
-        #   does not have the provided value already. This is really mostly
-        #   useful when calling _sees_form_ directly. Default is false.
-        #
-        def submit_form(*args)
-          selector = 'form'
-          values   = {}
-          options = {
-            :verify_field_enablment =&gt; true,
-            :verify_field_values    =&gt; false,
-            :include_hidden         =&gt; true
-          }
-          
-          case args.size
-          when 1
-            if args.first.is_a?(Hash)
-              values = args.first
-            else
-              selector = args.first
-            end
-          when 2
-            if args.first.is_a?(Hash)
-              values = args.first
-              options.update(args.last)
-            else
-              selector, values = *args
-            end
-          when 3
-            selector, values, = *args
+      # Submit a form to the application after verifying it exists in the
+      # current response body.
+      #
+      # If you are looking to use an alternate HTTP method, realize that the
+      # intention is that you would generate your form appropriately to
+      # include the hidden _method field. This will be handled by adding
+      # that value to your form fields.
+      #
+      # Other hidden fields will also be added
+      # unless you pass the option &lt;tt&gt;:include_hidden&lt;/tt&gt; with the value
+      # false. You may find this necessary when you have Arrays of Hashes -
+      # they are sufficiently too complex to handle correctly in the
+      # conversion to request parameters, merged with hiddens, and converted
+      # back to the expected data structure.
+      #
+      # This method supports a couple of argument sequences:
+      #
+      #   submit_form(selector = 'form', values = {}, options = {})
+      #   submit_form(values = {}, options = {})
+      #
+      # The former allows you to specify which form to submit when there are
+      # multiple forms on a page. _selector_ may be the id of the form or a
+      # valid CSS selector.
+      #
+      # The latter allows you to assume that there is only one form on the
+      # page. It essentially defaults selector to the CSS selector 'form'.
+      # Note that to pass options, you will need to use parens, as in:
+      #
+      #   submit_form({}, :include_hidden =&gt; false)
+      #
+      # You CAN use ActionController::TestUploadFile's as parameters, thanks
+      # to some work done by RubyRedRick!
+      #
+      # Supported options are:
+      #
+      # * &lt;tt&gt;:include_hidden&lt;/tt&gt; - defaults to true. Hidden fields will be
+      #   included into your supplied params.
+      # * &lt;tt&gt;:verify_field_enablment&lt;/tt&gt; - will fail submission if a field
+      #   is disabled. Default is true.
+      # * &lt;tt&gt;:verify_field_values&lt;/tt&gt; - will fail submission if a field
+      #   does not have the provided value already. This is really mostly
+      #   useful when calling _sees_form_ directly. Default is false.
+      #
+      def submit_form(*args)
+        selector = 'form'
+        values   = {}
+        options = {
+          :verify_field_enablment =&gt; true,
+          :verify_field_values    =&gt; false,
+          :include_hidden         =&gt; true
+        }
+        
+        case args.size
+        when 1
+          if args.first.is_a?(Hash)
+            values = args.first
+          else
+            selector = args.first
+          end
+        when 2
+          if args.first.is_a?(Hash)
+            values = args.first
             options.update(args.last)
+          else
+            selector, values = *args
           end
-          
-          form = sees_form(selector, values, options)
-          violated &quot;Form '#{selector}' is missing an 'action' attribute&quot; if form[&quot;action&quot;].blank?
-          submit_to form[&quot;action&quot;], load_hidden_fields(values, form, options[:include_hidden]), form[&quot;method&quot;], options
+        when 3
+          selector, values, = *args
+          options.update(args.last)
         end
         
-        private
-          def load_hidden_fields(values, form, include_hidden = true)
-            hiddens = css_select(form, &quot;input[type=hidden]&quot;)
-            return values if hiddens.blank?
-            
-            hidden_values = hiddens.inject([]) do |memo,h|
-              memo &lt;&lt; [h['name'], h['value']]; memo
-            end
-            
-            given_values = values.to_fields
-            form_method = hidden_values.assoc(&quot;_method&quot;)
-            given_values &lt;&lt; form_method if form_method
-            
-            if include_hidden
-              given_values.each do |fieldvalue|
-                fieldname = fieldvalue.first
-                hidden_values.delete_if do |hiddenvalue|
-                  fieldname == hiddenvalue.first
-                end
+        form = sees_form(selector, values, options)
+        violated &quot;Form '#{selector}' is missing an 'action' attribute&quot; if form[&quot;action&quot;].blank?
+        submit_to form[&quot;action&quot;], load_hidden_fields(values, form, options[:include_hidden]), form[&quot;method&quot;], options
+      end
+      
+      private
+        def load_hidden_fields(values, form, include_hidden = true)
+          hiddens = css_select(form, &quot;input[type=hidden]&quot;)
+          return values if hiddens.blank?
+          
+          hidden_values = hiddens.inject([]) do |memo,h|
+            memo &lt;&lt; [h['name'], h['value']]; memo
+          end
+          
+          given_values = values.to_fields
+          form_method = hidden_values.assoc(&quot;_method&quot;)
+          given_values &lt;&lt; form_method if form_method
+          
+          if include_hidden
+            given_values.each do |fieldvalue|
+              fieldname = fieldvalue.first
+              hidden_values.delete_if do |hiddenvalue|
+                fieldname == hiddenvalue.first
               end
-              given_values.concat(hidden_values)
             end
-            
-            ActionController::UrlEncodedPairParser.new(given_values).result
+            given_values.concat(hidden_values)
           end
-      end
+          
+          ActionController::UrlEncodedPairParser.new(given_values).result
+        end
       
     end
   end</diff>
      <filename>lib/spec/integration/dsl/form.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,99 +2,97 @@ module Spec
   module Integration
     module DSL
 
-      module NavigationExampleMethods
-        # Uses css_select to retrieve the anchor having href_or_id. The
-        # expects may indicate:
-        #
-        # Options are:
-        #
-        # * &lt;tt&gt;:count&lt;/tt&gt; - An expression indicating the expected number of times the link can appear.
-        #   The default is '&gt;= 1'.
-        def find_anchors(href_or_id, expects = {})
-          expects = {:count =&gt; &quot;&gt;= 1&quot;}.update(expects)
-          expects[:count] = &quot;== #{expects[:count]}&quot; if expects[:count].is_a? Integer
-          if href_or_id =~ /\// # couldn't be an id with a slash in it
-            links = css_select &quot;a[href=#{href_or_id}]&quot;
-            violated &quot;Expected #{expects[:count]} links to #{href_or_id}&quot; unless eval(&quot;#{links.size} #{expects[:count]}&quot;)
-          else
-            links = css_select &quot;a##{href_or_id}&quot;
-            violated &quot;Expected only one link having id #{href_or_id}. Recall that id's must be unique in a DOM.&quot; unless links.size == 1
-          end
-          links
+      # Uses css_select to retrieve the anchor having href_or_id. The
+      # expects may indicate:
+      #
+      # Options are:
+      #
+      # * &lt;tt&gt;:count&lt;/tt&gt; - An expression indicating the expected number of times the link can appear.
+      #   The default is '&gt;= 1'.
+      def find_anchors(href_or_id, expects = {})
+        expects = {:count =&gt; &quot;&gt;= 1&quot;}.update(expects)
+        expects[:count] = &quot;== #{expects[:count]}&quot; if expects[:count].is_a? Integer
+        if href_or_id =~ /\// # couldn't be an id with a slash in it
+          links = css_select &quot;a[href=#{href_or_id}]&quot;
+          violated &quot;Expected #{expects[:count]} links to #{href_or_id}&quot; unless eval(&quot;#{links.size} #{expects[:count]}&quot;)
+        else
+          links = css_select &quot;a##{href_or_id}&quot;
+          violated &quot;Expected only one link having id #{href_or_id}. Recall that id's must be unique in a DOM.&quot; unless links.size == 1
         end
+        links
+      end
+      
+      # Clicks the link having either href or id equal to value of :link. If
+      # you don't care whether the link is actually on the page, try using
+      # _navigate_to_.
+      #  
+      # Options are:
+      #
+      # * &lt;tt&gt;:link&lt;/tt&gt;     - href value or element id
+      # * &lt;tt&gt;:expects&lt;/tt&gt;  - {:count =&gt; &lt;expression&gt;}. See _find_anchors_.
+      # * &lt;tt&gt;:method&lt;/tt&gt;   - the preferred method to invoke, which assumes
+      #   there is more than one link with the same href but different
+      #   methods to invoke (like a show and delete link, which use the same
+      #   href but have methods of GET and DELETE). Defaults to :get.
+      #
+      def click_on(options)
+        response.should have_navigated_successfully
+        options = {
+          :link =&gt; nil,
+          :expects =&gt; {:count =&gt; &quot;&gt;= 1&quot;},
+          :method =&gt; :get
+        }.update(options)
         
-        # Clicks the link having either href or id equal to value of :link. If
-        # you don't care whether the link is actually on the page, try using
-        # _navigate_to_.
-        #  
-        # Options are:
-        #
-        # * &lt;tt&gt;:link&lt;/tt&gt;     - href value or element id
-        # * &lt;tt&gt;:expects&lt;/tt&gt;  - {:count =&gt; &lt;expression&gt;}. See _find_anchors_.
-        # * &lt;tt&gt;:method&lt;/tt&gt;   - the preferred method to invoke, which assumes
-        #   there is more than one link with the same href but different
-        #   methods to invoke (like a show and delete link, which use the same
-        #   href but have methods of GET and DELETE). Defaults to :get.
-        #
-        def click_on(options)
-          integration_session.should have_navigated_successfully
-          options = {
-            :link =&gt; nil,
-            :expects =&gt; {:count =&gt; &quot;&gt;= 1&quot;},
-            :method =&gt; :get
-          }.update(options)
-          
-          href = nil
-          method = nil
-          anchors = find_anchors(options[:link], options[:expects])
-          if anchors.size == 1
-            anchor = anchors.first
-            if onclick = anchor[&quot;onclick&quot;]
-              if onclick =~ /setAttribute\('name', '_method'\)/
-                onclick =~ /setAttribute\('value', '(get|put|delete|post)'\)/
-                href = anchor[&quot;href&quot;]
-                method = $1
-              else
-                violated &quot;There is some funky onclick on that link&quot;
-              end
-            else
+        href = nil
+        method = nil
+        anchors = find_anchors(options[:link], options[:expects])
+        if anchors.size == 1
+          anchor = anchors.first
+          if onclick = anchor[&quot;onclick&quot;]
+            if onclick =~ /setAttribute\('name', '_method'\)/
+              onclick =~ /setAttribute\('value', '(get|put|delete|post)'\)/
               href = anchor[&quot;href&quot;]
+              method = $1
+            else
+              violated &quot;There is some funky onclick on that link&quot;
             end
           else
-            anchor = nil
-            anchors.each do |a|
-              onclick = a[&quot;onclick&quot;]
-              if options[:method] == :get
-                anchor = a unless onclick
-              elsif onclick
-                if onclick =~ /setAttribute\('name', '_method'\)/
-                  onclick =~ /setAttribute\('value', '(get|put|delete|post)'\)/
-                  anchor = a if $1.to_s == options[:method].to_s
-                else
-                  violated &quot;There is some funky onclick on that link: #{a[&quot;onclick&quot;]}&quot;
-                end
+            href = anchor[&quot;href&quot;]
+          end
+        else
+          anchor = nil
+          anchors.each do |a|
+            onclick = a[&quot;onclick&quot;]
+            if options[:method] == :get
+              anchor = a unless onclick
+            elsif onclick
+              if onclick =~ /setAttribute\('name', '_method'\)/
+                onclick =~ /setAttribute\('value', '(get|put|delete|post)'\)/
+                anchor = a if $1.to_s == options[:method].to_s
+              else
+                violated &quot;There is some funky onclick on that link: #{a[&quot;onclick&quot;]}&quot;
               end
             end
-            violated &quot;No anchor found with method #{option[:method]}&quot; if anchor.nil?
-            href = anchor[&quot;href&quot;]
-            method = options[:method]
           end
-          navigate_to *[CGI.unescapeHTML(href), method].compact
-        end
-        
-        # Performs _method_ on the specified path, ensuring that doing so was
-        # successful. Will follow redirects.
-        def navigate_to(path, method = :get, params = nil, options = {})
-          self.send method, path, params || {}, options
-          follow_redirect! while response.redirect?
-          integration_session.should have_navigated_successfully(path)
-        end
-        
-        # Submits params to path, using the specified method - :post by
-        # default
-        def submit_to(path, params = {}, method = :post, options = {})
-          navigate_to path, method, params, options
+          violated &quot;No anchor found with method #{option[:method]}&quot; if anchor.nil?
+          href = anchor[&quot;href&quot;]
+          method = options[:method]
         end
+        navigate_to *[CGI.unescapeHTML(href), method].compact
+      end
+      
+      # Performs _method_ on the specified path, ensuring that doing so was
+      # successful. Will follow redirects.
+      def navigate_to(path, method = :get, params = nil, options = {})
+        self.send method, path, params || {}, options
+        follow_redirect! while response.redirect?
+        response.should have_navigated_successfully(path)
+      end
+      
+      # Submits params to path, using the specified method - :post by
+      # default
+      def submit_to(path, params = {}, method = :post, options = {})
+        navigate_to path, method, params, options
       end
 
     end</diff>
      <filename>lib/spec/integration/dsl/navigation.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,25 +1,42 @@
-# FIXME: this should be in a module that only gets loaded in integration tests
-# This monkeypatch currently makes it impossible to create isolated controller specs
-# that pass through exceptions (see &#8220;Expecting Errors&#8221; on
-# http://rspec.info/rdoc-rails/classes/Spec/Rails/Example/ControllerExampleGroup.html)
-ActionController::Base.class_eval do
-  def use_rails_error_handling_with_integration_support?
-    if Spec::Integration::DSL::IntegrationExample::during_integration_example
-      true
-    else
-      use_rails_error_handling_without_integration_support?
+module Spec
+  module Integration
+    module Extensions
+      
+      # The point of all this is to simply capture the exceptions of an action
+      # during an integration testing request (get, post, put, etc). This
+      # exception is later used in the navigation matcher to show the failure
+      # if navigation did not succeed due to an exception.
+      #
+      module ActionController
+        def self.included(base)
+          base.extend(ClassMethods)
+          base.metaclass.module_eval do
+            alias_method_chain :new, :integration_extensions
+          end
+        end
+        
+        module ClassMethods #:nodoc:
+          def new_with_integration_extensions(*args)
+            controller = new_without_integration_extensions(*args)
+            if Spec::Integration.executing_integration_example
+              controller.use_rails_error_handling!
+              controller.metaclass.module_eval do
+                attr_reader :rescued_exception
+                def rescue_action(e)
+                  @rescued_exception = e
+                  super
+                end
+              end
+            end
+            controller
+          end
+        end
+      end
+      
     end
   end
-  alias_method_chain :use_rails_error_handling?, :integration_support
-  
-  attr_reader :rescued_exception
-  def rescue_action_with_integration_support(e)
-    if Spec::Integration::DSL::IntegrationExample::during_integration_example
-      @rescued_exception = e
-      rescue_action_without_fast_errors e
-    else
-      rescue_action_without_integration_support e
-    end
-  end
-  alias_method_chain :rescue_action, :integration_support
 end
+
+ActionController::Base.module_eval do
+  include Spec::Integration::Extensions::ActionController
+end
\ No newline at end of file</diff>
      <filename>lib/spec/integration/extensions/action_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,15 +3,15 @@ module Spec
     module Matchers
       
       class NavigateSuccessfully #:nodoc:
-        def initialize(where)
-          @where = where
+        def initialize(example, where)
+          @example, @where = example, where
         end
         
-        def matches?(example)
-          if example.response.error? || example.response.body =~ /Exception caught/
-            @failure_message = extract_exception(example)
-          elsif example.response.missing?
-            @failure_message = &quot;Missing document #{example.request.method}'ing #{@where}&quot;
+        def matches?(response)
+          if response.error? || response.body =~ /Exception caught/
+            @failure_message = extract_exception(@example)
+          elsif response.missing?
+            @failure_message = &quot;Missing document #{@example.request.method}'ing #{@where}&quot;
           end
           @failure_message.nil?
         end
@@ -48,11 +48,10 @@ module Spec
       end
       
       # Specify that a response should be a good one: successful, not missing,
-      # no server errors, etc. This is used internally by
-      # Spec::Integration::DSL::NavigationExampleMethods, made available to
-      # you for good pleasure.
+      # no server errors, etc.
+      #
       def have_navigated_successfully(where = request.request_uri)
-        NavigateSuccessfully.new(where)
+        NavigateSuccessfully.new(self, where)
       end
       
     end</diff>
      <filename>lib/spec/integration/matchers/navigate_successfully.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,7 @@ require File.dirname(__FILE__) + '/../spec_helper'
 
 describe &quot;submit_form&quot;, :type =&gt; :controller do
   include Spec::Integration::DSL
+  include Spec::Integration::Matchers
   controller_name :integration_dsl
   
   before do
@@ -13,12 +14,12 @@ describe &quot;submit_form&quot;, :type =&gt; :controller do
   end
   
   it &quot;should find the form having the given id&quot; do
-    should_receive(:post).with(&quot;/cancel&quot;, {})
+    should_receive(:post).with(&quot;/cancel&quot;, {}, an_instance_of(Hash))
     submit_form &quot;cancel_form&quot;
   end
   
   it 'should find the form matching the given css selector' do
-    should_receive(:post).with(&quot;/repeat&quot;, {})
+    should_receive(:post).with(&quot;/repeat&quot;, {}, an_instance_of(Hash))
     submit_form '.special'
   end
   
@@ -26,12 +27,12 @@ describe &quot;submit_form&quot;, :type =&gt; :controller do
     response.stub!(:body).and_return %{
       &lt;form action=&quot;/single&quot; method=&quot;get&quot;&gt;&lt;/form&gt;
     }
-    should_receive(:get).with('/single', {})
+    should_receive(:get).with('/single', {}, an_instance_of(Hash))
     submit_form
   end
   
   it &quot;should use method of the rendered form&quot; do
-    should_receive(:get).with(&quot;/order&quot;, {})
+    should_receive(:get).with(&quot;/order&quot;, {}, an_instance_of(Hash))
     submit_form &quot;order_form&quot;
   end
   
@@ -58,7 +59,7 @@ describe &quot;submit_form&quot;, :type =&gt; :controller do
           'overridden' =&gt; 'not_from_form'
         }
       }
-      should_receive(:post).with(&quot;/hiddens&quot;, @expected)
+      should_receive(:post).with(&quot;/hiddens&quot;, @expected, an_instance_of(Hash))
     end
     
     it 'should be overridden when values are supplied' do
@@ -99,7 +100,7 @@ describe 'Expectations about parsing query parameters: ' do
   
   def parse_as(expected)
     satisfy do |uri|
-      actual = ActionController::AbstractRequest.parse_query_parameters(URI.escape(uri))
+      actual = ActionController::UrlEncodedPairParser.parse_query_parameters(URI.escape(uri))
       actual == expected
     end
   end</diff>
      <filename>spec/dsl/form_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,11 +21,11 @@ describe &quot;An integration spec&quot;, :type =&gt; :integration do
   end
   
   it &quot;should have the form dsl&quot; do
-    should respond_to(&quot;submit_form&quot;)
+    lambda { submit_form }.should_not raise_error(NoMethodError, /submit_form/)
   end
   
   it &quot;should have the navigation dsl&quot; do
-    should respond_to(&quot;navigate_to&quot;)
+    lambda { navigate_to }.should_not raise_error(NoMethodError, /navigate_to/)
   end
   
   it &quot;should have the showing matchers&quot; do</diff>
      <filename>spec/dsl/integration_spec_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,7 @@ require File.dirname(__FILE__) + '/../spec_helper'
 
 describe &quot;find_anchors&quot;, :type =&gt; :controller do
   include Spec::Integration::DSL
+  include Spec::Integration::Matchers
   controller_name :integration_dsl
   
   before do
@@ -19,17 +20,14 @@ describe &quot;find_anchors&quot;, :type =&gt; :controller do
   end
 end
 
-describe &quot;have_navigated_successfully&quot;, :type =&gt; :controller do
-  include Spec::Integration::DSL
-  controller_name :integration_dsl
-  
+describe &quot;have_navigated_successfully&quot;, :type =&gt; :integration do
   it &quot;should report the exception in the failure message&quot; do
     with_routing do |set|; set.draw do |map|
-      map.connect ':controller/:action/:id'
-      get :exploding
+      map.connect '/exploding', :controller =&gt; 'integration_dsl', :action =&gt; 'exploding'
+      get '/exploding'
       lambda do
-        should have_navigated_successfully
-      end.should fail_with(/This will blow up!/)
+        response.should have_navigated_successfully
+      end.should raise_error(Spec::Expectations::ExpectationNotMetError, /This will blow up!/)
     end; end
   end
 end
\ No newline at end of file</diff>
      <filename>spec/dsl/navigation_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,17 @@
 SPEC_ROOT = File.expand_path(File.dirname(__FILE__))
-$LOAD_PATH &lt;&lt; SPEC_ROOT # for application.rb
+$LOAD_PATH.unshift(SPEC_ROOT) # for application_controller.rb
+ 
+RAILS_ROOT = File.expand_path(&quot;#{SPEC_ROOT}/..&quot;)
+$LOAD_PATH.unshift(&quot;#{RAILS_ROOT}/lib&quot;)
 
-require &quot;#{SPEC_ROOT}/../plugit/descriptor&quot;
+require 'rubygems'
+require 'active_support'
+require 'active_record'
+require 'action_pack'
+require 'action_controller'
+require 'action_mailer'
 
-RAILS_ROOT = &quot;#{SPEC_ROOT}/..&quot;
-$LOAD_PATH &lt;&lt; &quot;#{RAILS_ROOT}/lib&quot;
+require 'rails/version'
 
 require 'spec/integration'
 require 'integration_dsl_controller'
\ No newline at end of file</diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/spec/integration/dsl/integration_example_group.rb</filename>
    </removed>
    <removed>
      <filename>plugit/descriptor.rb</filename>
    </removed>
    <removed>
      <filename>spec/application.rb</filename>
    </removed>
    <removed>
      <filename>spec/dispatcher.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>199f9c9382f72c371dd0ec9a1bf44b9e980ace07</id>
    </parent>
  </parents>
  <author>
    <name>Adam Williams</name>
    <email>adam@thewilliams.ws</email>
  </author>
  <url>http://github.com/aiwilliams/spec_integration/commit/1a38f7833ecb8f2e32a0bc4f104db2cfbcf6663f</url>
  <id>1a38f7833ecb8f2e32a0bc4f104db2cfbcf6663f</id>
  <committed-date>2009-02-27T14:09:05-08:00</committed-date>
  <authored-date>2009-02-27T14:09:05-08:00</authored-date>
  <message>Running in Rails 2.3</message>
  <tree>2ff08eab5d25ceac79f14aa9f0f8df81f7f74643</tree>
  <committer>
    <name>Adam Williams</name>
    <email>adam@thewilliams.ws</email>
  </committer>
</commit>
