<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>db/test.sqlite</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -121,7 +121,7 @@ of SEO-friendly URLs and DRY controller code.
 
 == Tests
 
-To run the tests, you must have the mocha and test-spec gems installed.
+To run the tests, you must have the mocha, test-spec, and sqlite3 gems installed.
 
   rake test
 </diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -20,4 +20,5 @@ Gem::Specification.new do |s|
   s.rdoc_options = [&quot;--main&quot;, &quot;README&quot;]
   s.extra_rdoc_files = [&quot;README&quot;]
   s.add_dependency(&quot;actionpack&quot;, [&quot;&gt; 2.0.1&quot;])
+  s.add_dependency(&quot;sqlite3-ruby&quot;, [&quot;&gt; 1.2.1&quot;])
 end
\ No newline at end of file</diff>
      <filename>finder_filter.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -33,6 +33,11 @@ module FinderFilter
           item = by ? klass.send(&quot;find_by_#{by}&quot;, params[param]) : klass.find(params[param])
         end
       end
+      if item.nil?
+        flash[:error] = &quot;The requested #{name} does not exist.&quot;
+        index_path = nested ? send(&quot;#{nested}_path&quot;, nested_item) : send(&quot;#{name.to_s.pluralize}_path&quot;)
+        redirect_to index_path
+      end
       instance_variable_set(&quot;@#{name}&quot;, item)
     end
   end</diff>
      <filename>lib/finder_filter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 require File.expand_path(File.dirname(__FILE__) + '/test_helper')
 
-class BooksController &lt; ActionController::Base; extend FinderFilter; def show; end; end
+class BooksController &lt; ActionController::Base; extend FinderFilter; end
 class Book &lt; ActiveRecord::Base; end
 class Novel &lt; ActiveRecord::Base; end
 class Tome &lt; ActiveRecord::Base; def param_column; &quot;foo&quot;; end; end
@@ -8,6 +8,12 @@ class Tome &lt; ActiveRecord::Base; def param_column; &quot;foo&quot;; end; end
 describe FinderFilter do
   before do
      @books_controller = BooksController.new
+     @books_controller.stubs(:flash).returns({})
+     @books_controller.stubs(:index_path)
+     @books_controller.stubs(:books_path)
+     @books_controller.stubs(:novels_path)
+     @books_controller.stubs(:tomes_path)
+     @books_controller.stubs(:redirect_to)
   end
   
   it &quot;should call find on the model&quot; do
@@ -37,5 +43,4 @@ describe FinderFilter do
     Tome.expects(:from_param).with(7)
     @books_controller.find_tome
   end
-
 end</diff>
      <filename>test/finder_filter_finding_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,5 +3,12 @@ require 'test/spec'
 require 'mocha'
 require 'action_controller'
 require 'active_record'
+require 'sqlite3'
 
-require File.expand_path(File.dirname(__FILE__) + '/../lib/finder_filter')
\ No newline at end of file
+require File.expand_path(File.dirname(__FILE__) + '/../lib/finder_filter')
+
+# connect to the database (sqlite in this case)
+ActiveRecord::Base.establish_connection({
+      :adapter =&gt; 'sqlite3', 
+      :dbfile =&gt; File.expand_path(File.dirname(__FILE__) + '/../db/test.sqlite')
+})</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b63df2d883be961d13d364ad8d49c7b8ed60ecbd</id>
    </parent>
  </parents>
  <author>
    <name>Matthew Bass</name>
    <email>matt@anacreon.local</email>
  </author>
  <url>http://github.com/pelargir/finder_filter/commit/97551021cd85be72f109e3d0aba6a0ffba05665c</url>
  <id>97551021cd85be72f109e3d0aba6a0ffba05665c</id>
  <committed-date>2008-10-30T13:13:20-07:00</committed-date>
  <authored-date>2008-10-30T13:13:20-07:00</authored-date>
  <message>fixed tests and added sqlite3 dependency</message>
  <tree>e4b600d328bbb72c684d92a0d088195843530ba0</tree>
  <committer>
    <name>Matthew Bass</name>
    <email>matt@anacreon.local</email>
  </committer>
</commit>
