<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -21,14 +21,14 @@ begin
   desc &quot;Run all specs in spec directory (excluding plugin specs)&quot;
   Spec::Rake::SpecTask.new(:spec =&gt; spec_prereq) do |t|
     t.spec_opts = ['--options', &quot;\&quot;#{RAILS_ROOT}/spec/spec.opts\&quot;&quot;]
-    t.spec_files = FileList['spec/**/*_spec.rb']
+    t.spec_files = FileList['spec/**/*/*_spec.rb']
   end
 
   namespace :spec do
     desc &quot;Run all specs in spec directory with RCov (excluding plugin specs)&quot;
     Spec::Rake::SpecTask.new(:rcov) do |t|
       t.spec_opts = ['--options', &quot;\&quot;#{RAILS_ROOT}/spec/spec.opts\&quot;&quot;]
-      t.spec_files = FileList['spec/**/*_spec.rb']
+      t.spec_files = FileList['spec/**/*/*_spec.rb']
       t.rcov = true
       t.rcov_opts = lambda do
         IO.readlines(&quot;#{RAILS_ROOT}/spec/rcov.opts&quot;).map {|l| l.chomp.split &quot; &quot;}.flatten
@@ -38,13 +38,13 @@ begin
     desc &quot;Print Specdoc for all specs (excluding plugin specs)&quot;
     Spec::Rake::SpecTask.new(:doc) do |t|
       t.spec_opts = [&quot;--format&quot;, &quot;specdoc&quot;, &quot;--dry-run&quot;]
-      t.spec_files = FileList['spec/**/*_spec.rb']
+      t.spec_files = FileList['spec/**/*/*_spec.rb']
     end
 
     desc &quot;Print Specdoc for all plugin examples&quot;
     Spec::Rake::SpecTask.new(:plugin_doc) do |t|
       t.spec_opts = [&quot;--format&quot;, &quot;specdoc&quot;, &quot;--dry-run&quot;]
-      t.spec_files = FileList['vendor/plugins/**/spec/**/*_spec.rb'].exclude('vendor/plugins/rspec/*')
+      t.spec_files = FileList['vendor/plugins/**/spec/**/*/*_spec.rb'].exclude('vendor/plugins/rspec/*')
     end
 
     [:models, :controllers, :views, :helpers, :lib].each do |sub|
@@ -58,14 +58,14 @@ begin
     desc &quot;Run the code examples in vendor/plugins (except RSpec's own)&quot;
     Spec::Rake::SpecTask.new(:plugins =&gt; spec_prereq) do |t|
       t.spec_opts = ['--options', &quot;\&quot;#{RAILS_ROOT}/spec/spec.opts\&quot;&quot;]
-      t.spec_files = FileList['vendor/plugins/**/spec/**/*_spec.rb'].exclude('vendor/plugins/rspec/*').exclude(&quot;vendor/plugins/rspec-rails/*&quot;)
+      t.spec_files = FileList['vendor/plugins/**/spec/**/*/*_spec.rb'].exclude('vendor/plugins/rspec/*').exclude(&quot;vendor/plugins/rspec-rails/*&quot;)
     end
 
     namespace :plugins do
       desc &quot;Runs the examples for rspec_on_rails&quot;
       Spec::Rake::SpecTask.new(:rspec_on_rails) do |t|
         t.spec_opts = ['--options', &quot;\&quot;#{RAILS_ROOT}/spec/spec.opts\&quot;&quot;]
-        t.spec_files = FileList['vendor/plugins/rspec-rails/spec/**/*_spec.rb']
+        t.spec_files = FileList['vendor/plugins/rspec-rails/spec/**/*/*_spec.rb']
       end
     end
 </diff>
      <filename>generators/rspec/templates/rspec.rake</filename>
    </modified>
    <modified>
      <diff>@@ -3,9 +3,9 @@ module Rails
     class GeneratedAttribute
       def default_value
         @default_value ||= case type
-          when :int, :integer               then &quot;\&quot;1\&quot;&quot;
-          when :float                       then &quot;\&quot;1.5\&quot;&quot;
-          when :decimal                     then &quot;\&quot;9.99\&quot;&quot;
+          when :int, :integer               then &quot;1&quot;
+          when :float                       then &quot;1.5&quot;
+          when :decimal                     then &quot;9.99&quot;
           when :datetime, :timestamp, :time then &quot;Time.now&quot;
           when :date                        then &quot;Date.today&quot;
           when :string, :text               then &quot;\&quot;value for #{@name}\&quot;&quot;</diff>
      <filename>generators/rspec_default_values.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 require File.expand_path(File.dirname(__FILE__) + '&lt;%= '/..' * class_nesting_depth %&gt;/../../spec_helper')
 
-&lt;% output_attributes = attributes.reject{|attribute| attribute.name =~ /_id/ || [:datetime, :timestamp, :time, :date].index(attribute.type) } -%&gt;
+&lt;% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%&gt;
 describe &quot;/&lt;%= table_name %&gt;/edit.&lt;%= default_file_extension %&gt;&quot; do
   include &lt;%= controller_class_name %&gt;Helper
   </diff>
      <filename>generators/rspec_scaffold/templates/edit_erb_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 require File.expand_path(File.dirname(__FILE__) + '&lt;%= '/..' * class_nesting_depth %&gt;/../../spec_helper')
 
-&lt;% output_attributes = attributes.reject{|attribute| attribute.name =~ /_id/ || [:datetime, :timestamp, :time, :date].index(attribute.type) } -%&gt;
+&lt;% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%&gt;
 describe &quot;/&lt;%= table_name %&gt;/index.&lt;%= default_file_extension %&gt;&quot; do
   include &lt;%= controller_class_name %&gt;Helper
   
@@ -21,7 +21,7 @@ describe &quot;/&lt;%= table_name %&gt;/index.&lt;%= default_file_extension %&gt;&quot; do
   it &quot;should render list of &lt;%= table_name %&gt;&quot; do
     render &quot;/&lt;%= table_name %&gt;/index.&lt;%= default_file_extension %&gt;&quot;
 &lt;% for attribute in output_attributes -%&gt;
-    response.should have_tag(&quot;tr&gt;td&quot;, &lt;%= attribute.default_value %&gt;, 2)
+    response.should have_tag(&quot;tr&gt;td&quot;, &lt;%= attribute.default_value %&gt;.to_s, 2)
 &lt;% end -%&gt;
   end
 end</diff>
      <filename>generators/rspec_scaffold/templates/index_erb_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 require File.expand_path(File.dirname(__FILE__) + '&lt;%= '/..' * class_nesting_depth %&gt;/../../spec_helper')
 
-&lt;% output_attributes = attributes.reject{|attribute| attribute.name =~ /_id/ || [:datetime, :timestamp, :time, :date].index(attribute.type) } -%&gt;
+&lt;% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%&gt;
 describe &quot;/&lt;%= table_name %&gt;/new.&lt;%= default_file_extension %&gt;&quot; do
   include &lt;%= controller_class_name %&gt;Helper
   </diff>
      <filename>generators/rspec_scaffold/templates/new_erb_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 require File.expand_path(File.dirname(__FILE__) + '&lt;%= '/..' * class_nesting_depth %&gt;/../../spec_helper')
 
-&lt;% output_attributes = attributes.reject{|attribute| attribute.name =~ /_id/ || [:datetime, :timestamp, :time, :date].index(attribute.type) } -%&gt;
+&lt;% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%&gt;
 describe &quot;/&lt;%= table_name %&gt;/show.&lt;%= default_file_extension %&gt;&quot; do
   include &lt;%= controller_class_name %&gt;Helper
   before(:each) do
@@ -16,7 +16,7 @@ describe &quot;/&lt;%= table_name %&gt;/show.&lt;%= default_file_extension %&gt;&quot; do
   it &quot;should render attributes in &lt;p&gt;&quot; do
     render &quot;/&lt;%= table_name %&gt;/show.&lt;%= default_file_extension %&gt;&quot;
 &lt;% for attribute in output_attributes -%&gt;
-    response.should have_text(/&lt;%= Regexp.escape(attribute.default_value)[1..-2]%&gt;/)
+    response.should have_text(/&lt;%= Regexp.escape(attribute.default_value).gsub(/^&quot;|&quot;$/, '')%&gt;/)
 &lt;% end -%&gt;
   end
 end</diff>
      <filename>generators/rspec_scaffold/templates/show_erb_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,11 @@
 silence_warnings { RAILS_ENV = &quot;test&quot; }
 
-require_dependency 'application'
+begin
+  require_dependency 'application_controller'
+rescue MissingSourceFile
+  require_dependency 'application'
+end
+
 require 'action_controller/test_process'
 require 'action_controller/integration'
 require 'active_record/fixtures' if defined?(ActiveRecord::Base)</diff>
      <filename>lib/spec/rails.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,26 +8,21 @@ module Spec
   module Rails
 
     module Example
-      class RailsExampleGroup &lt; Test::Unit::TestCase
-        
-        # Rails &gt;= r8570 uses setup/teardown_fixtures explicitly
-        # However, Rails &gt;= r8664 extracted these out to use ActiveSupport::Callbacks.
-        # The latter case is handled at the TestCase level, in interop/testcase.rb
-        unless ActiveSupport.const_defined?(:Callbacks) and self.include?(ActiveSupport::Callbacks)
-          before(:each) do
-            setup_fixtures if self.respond_to?(:setup_fixtures)
-          end
-          after(:each) do
-            teardown_fixtures if self.respond_to?(:teardown_fixtures)
-          end
+      if ActiveSupport.const_defined?(:TestCase)
+        class RailsExampleGroup &lt; ActiveSupport::TestCase
+          include ActionController::Assertions::SelectorAssertions
         end
-        
+      else
+        class RailsExampleGroup &lt; Test::Unit::TestCase
+        end
+      end
+      
+      class RailsExampleGroup
         include Spec::Rails::Matchers
         include Spec::Rails::Mocks
-        
         Spec::Example::ExampleGroupFactory.default(self)
-        
       end
+      
     end
   end
 end</diff>
      <filename>lib/spec/rails/example/rails_example_group.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,13 @@
 require 'spec/example/configuration'
+require 'test_help'
+
 begin
 module Spec
   module Example
     class Configuration
+      
+      TEST_CASE = ActiveSupport.const_defined?(:TestCase) ? ActiveSupport::TestCase : Test::Unit::TestCase
+      
       # Rails 1.2.3 does a copy of the @inheritable_attributes to the subclass when the subclass is
       # created. This causes an ordering issue when setting state on Configuration because the data is
       # already copied.
@@ -10,7 +15,7 @@ module Spec
       # @inheritable_attributes updated.
       # TODO: BT - When we no longer support Rails 1.2.3, we can remove this functionality
       EXAMPLE_GROUP_CLASSES = [
-        ::Test::Unit::TestCase,
+        TEST_CASE,
         ::Spec::Rails::Example::RailsExampleGroup,
         ::Spec::Rails::Example::FunctionalExampleGroup,
         ::Spec::Rails::Example::ControllerExampleGroup,
@@ -26,7 +31,7 @@ module Spec
         end
 
         def use_transactional_fixtures
-          Test::Unit::TestCase.use_transactional_fixtures
+          TEST_CASE.use_transactional_fixtures
         end
         def use_transactional_fixtures=(value)
           EXAMPLE_GROUP_CLASSES.each do |example_group|
@@ -35,7 +40,7 @@ module Spec
         end
 
         def use_instantiated_fixtures
-          Test::Unit::TestCase.use_instantiated_fixtures
+          TEST_CASE.use_instantiated_fixtures
         end
         def use_instantiated_fixtures=(value)
           EXAMPLE_GROUP_CLASSES.each do |example_group|
@@ -44,7 +49,7 @@ module Spec
         end
 
         def fixture_path
-          Test::Unit::TestCase.fixture_path
+          TEST_CASE.fixture_path
         end
         def fixture_path=(path)
           EXAMPLE_GROUP_CLASSES.each do |example_group|
@@ -53,7 +58,7 @@ module Spec
         end
 
         def global_fixtures
-          ::Test::Unit::TestCase.fixture_table_names
+          TEST_CASE.fixture_table_names
         end
         def global_fixtures=(fixtures)
           EXAMPLE_GROUP_CLASSES.each do |example_group|</diff>
      <filename>lib/spec/rails/extensions/spec/example/configuration.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,18 +9,18 @@ module Spec
       end
 
       describe &quot;#use_transactional_fixtures&quot; do
-        it &quot;should return Test::Unit::TestCase.use_transactional_fixtures&quot; do
-          config.use_transactional_fixtures.should == Test::Unit::TestCase.use_transactional_fixtures
+        it &quot;should return #{Spec::Example::Configuration::TEST_CASE}.use_transactional_fixtures&quot; do
+          config.use_transactional_fixtures.should == Spec::Example::Configuration::TEST_CASE.use_transactional_fixtures
         end
 
-        it &quot;should set Test::Unit::TestCase.use_transactional_fixtures to false&quot; do
+        it &quot;should set #{Spec::Example::Configuration::TEST_CASE}.use_transactional_fixtures to false&quot; do
           Configuration::EXAMPLE_GROUP_CLASSES.each do |example_group|
             example_group.should_receive(:use_transactional_fixtures=).with(false)
           end
           config.use_transactional_fixtures = false
         end
 
-        it &quot;should set Test::Unit::TestCase.use_transactional_fixtures to true&quot; do
+        it &quot;should set #{Spec::Example::Configuration::TEST_CASE}.use_transactional_fixtures to true&quot; do
           Configuration::EXAMPLE_GROUP_CLASSES.each do |example_group|
             example_group.should_receive(:use_transactional_fixtures=).with(true)
           end
@@ -29,18 +29,18 @@ module Spec
       end
 
       describe &quot;#use_instantiated_fixtures&quot; do
-        it &quot;should return Test::Unit::TestCase.use_transactional_fixtures&quot; do
-          config.use_instantiated_fixtures.should == Test::Unit::TestCase.use_instantiated_fixtures
+        it &quot;should return #{Spec::Example::Configuration::TEST_CASE}.use_transactional_fixtures&quot; do
+          config.use_instantiated_fixtures.should == Spec::Example::Configuration::TEST_CASE.use_instantiated_fixtures
         end
 
-        it &quot;should set Test::Unit::TestCase.use_instantiated_fixtures to false&quot; do
+        it &quot;should set #{Spec::Example::Configuration::TEST_CASE}.use_instantiated_fixtures to false&quot; do
           Configuration::EXAMPLE_GROUP_CLASSES.each do |example_group|
             example_group.should_receive(:use_instantiated_fixtures=).with(false)
           end
           config.use_instantiated_fixtures = false
         end
 
-        it &quot;should set Test::Unit::TestCase.use_instantiated_fixtures to true&quot; do
+        it &quot;should set #{Spec::Example::Configuration::TEST_CASE}.use_instantiated_fixtures to true&quot; do
           Configuration::EXAMPLE_GROUP_CLASSES.each do |example_group|
             example_group.should_receive(:use_instantiated_fixtures=).with(true)
           end</diff>
      <filename>spec/rails/example/configuration_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>UPGRADE</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>ed8d8a2a7fe3cb53293d7ca96a5a8866ec0b10d7</id>
    </parent>
    <parent>
      <id>ad1e2f01ebec7abeb5e2a889f5078bee60a4f6cc</id>
    </parent>
  </parents>
  <author>
    <name>Ian White</name>
    <email>ian.w.white@gmail.com</email>
  </author>
  <url>http://github.com/ianwhite/rspec-rails/commit/210068a725858708616a135ebbd3d5467d87fb97</url>
  <id>210068a725858708616a135ebbd3d5467d87fb97</id>
  <committed-date>2008-12-10T18:13:32-08:00</committed-date>
  <authored-date>2008-12-10T18:13:32-08:00</authored-date>
  <message>Merge branch 'master' of git://github.com/dchelimsky/rspec-rails

Conflicts:
	lib/spec/rails.rb</message>
  <tree>8b1ee36bfd1c596c8ec0985078998c5745cfd760</tree>
  <committer>
    <name>Ian White</name>
    <email>ian.w.white@gmail.com</email>
  </committer>
</commit>
