Sha256: e4d27c98a659831aa3c56f42febc585b79d7f42c086b676764f1cc1538011b60

Contents?: true

Size: 682 Bytes

Versions: 39

Compression:

Stored size: 682 Bytes

Contents

require 'cases/sqlserver_helper'
require 'models/developer'

class MethodScopingTestSqlServer < ActiveRecord::TestCase
end

class NestedScopingTest < ActiveRecord::TestCase
  
  COERCED_TESTS = [:test_merged_scoped_find]
  
  include SqlserverCoercedTest
  
  fixtures :developers

  def test_coerced_test_merged_scoped_find
    poor_jamis = developers(:poor_jamis)
    Developer.with_scope(:find => { :conditions => "salary < 100000" }) do
      Developer.with_scope(:find => { :offset => 1, :order => 'id asc' }) do
        assert_sql /ORDER BY id ASC/ do
          assert_equal(poor_jamis, Developer.find(:first, :order => 'id asc'))
        end
      end
    end
  end
  
end


Version data entries

39 entries across 39 versions & 5 rubygems

Version Path
artpop-2000-2005-adapter-2.2.15 test/cases/method_scoping_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.14 test/cases/method_scoping_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.15 test/cases/method_scoping_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.16 test/cases/method_scoping_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.17 test/cases/method_scoping_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.18 test/cases/method_scoping_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.19 test/cases/method_scoping_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.21 test/cases/method_scoping_test_sqlserver.rb
rainux-2000-2005-adapter-2.2.15 test/cases/method_scoping_test_sqlserver.rb
rainux-rails-sqlserver-2000-2005-2008-adapter-2.2.15 test/cases/method_scoping_test_sqlserver.rb
activerecord-sqlserver-adapter-2.3.24 test/cases/method_scoping_test_sqlserver.rb
activerecord-sqlserver-adapter-2.3.23 test/cases/method_scoping_test_sqlserver.rb
activerecord-sqlserver-adapter-2.3.22 test/cases/method_scoping_test_sqlserver.rb
activerecord-sqlserver-adapter-2.3.21 test/cases/method_scoping_test_sqlserver.rb
activerecord-sqlserver-adapter-2.3.20 test/cases/method_scoping_test_sqlserver.rb
activerecord-sqlserver-adapter-2.3.19 test/cases/method_scoping_test_sqlserver.rb
activerecord-sqlserver-adapter-2.3.18 test/cases/method_scoping_test_sqlserver.rb
activerecord-sqlserver-adapter-2.3.17 test/cases/method_scoping_test_sqlserver.rb
activerecord-sqlserver-adapter-2.3.16 test/cases/method_scoping_test_sqlserver.rb
activerecord-sqlserver-adapter-2.3.15 test/cases/method_scoping_test_sqlserver.rb