Permalink
Browse files

move a spec that requires the database under the group that is skippe…

…d if the connection could not be established
  • Loading branch information...
1 parent 6aa1111 commit 995e8315e871625179a409e782b0b99b076af91a @mislav mislav committed Jan 11, 2009
Showing with 13 additions and 13 deletions.
  1. +13 −13 spec/finders/active_record_spec.rb
@@ -142,19 +142,6 @@ def self.column_names
ArProject.paginate_by_id(ids, :per_page => 3, :page => 2, :order => 'id')
end
-
- # Is this Rails 2.0? Find out by testing find_all which was removed in [6998]
- unless ActiveRecord::Base.respond_to? :find_all
- it "should paginate array of IDs" do
- # AR finders also accept arrays of IDs
- # (this was broken in Rails before [6912])
- lambda {
- result = Developer.paginate((1..8).to_a, :per_page => 3, :page => 2, :order => 'id')
- result.map(&:id).should == (4..6).to_a
- result.total_entries.should == 8
- }.should run_queries(1)
- end
- end
it "doesn't mangle options" do
ArProject.expects(:find).returns([])
@@ -429,6 +416,19 @@ def self.column_names
lambda { Developer.paginate :readonly => true, :page => 1 }.should_not raise_error
end
+ # detect ActiveRecord 2.0
+ unless ActiveRecord::Base.respond_to? :find_all
+ it "should paginate array of IDs" do
+ # AR finders also accept arrays of IDs
+ # (this was broken in Rails before [6912])
+ lambda {
+ result = Developer.paginate((1..8).to_a, :per_page => 3, :page => 2, :order => 'id')
+ result.map(&:id).should == (4..6).to_a
+ result.total_entries.should == 8
+ }.should run_queries(1)
+ end
+ end
+
end
protected

0 comments on commit 995e831

Please sign in to comment.