Sha256: e2dd727bca99ba4224f95080a9be8c1957a85b09ff4f5f7c4623e404310ac96c
Contents?: true
Size: 747 Bytes
Versions: 10
Compression:
Stored size: 747 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Octopus::ScopeProxy do it "should allow nested queries" do @user1 = User.using(:brazil).create!(:name => "Thiago P", :number => 3) @user2 = User.using(:brazil).create!(:name => "Thiago", :number => 1) @user3 = User.using(:brazil).create!(:name => "Thiago", :number => 2) User.using(:brazil).where(:name => "Thiago").where(:number => 4).order(:number).all.should == [] User.using(:brazil).where(:name => "Thiago").using(:canada).where(:number => 2).using(:brazil).order(:number).all.should == [@user3] User.using(:brazil).where(:name => "Thiago").using(:canada).where(:number => 4).using(:brazil).order(:number).all.should == [] end end
Version data entries
10 entries across 10 versions & 1 rubygems