Sha256: 614b355148e2ce5b6aaeef54738cb4e55778b6034f3653c0a95a24dea88a2b64

Contents?: true

Size: 480 Bytes

Versions: 42

Compression:

Stored size: 480 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")

describe "AliasScope" do
  it "should allow alias scopes" do
    User.create(:username => "bjohnson")
    User.create(:username => "thunt")
    User.username_has("bjohnson").all.should == User.find_all_by_username("bjohnson")
  end
  
  it "should allow alias scopes from the search object" do
    search = User.search
    search.username_has = "bjohnson"
    search.username_has.should == "bjohnson"
  end
end

Version data entries

42 entries across 42 versions & 6 rubygems

Version Path
newellista-searchlogic-2.0.3 spec/named_scopes/alias_scope_spec.rb
newellista-searchlogic-2.0.4 spec/named_scopes/alias_scope_spec.rb
newellista-searchlogic-2.0.5 spec/named_scopes/alias_scope_spec.rb
newellista-searchlogic-2.0.6 spec/named_scopes/alias_scope_spec.rb
newellista-searchlogic-2.0.7 spec/named_scopes/alias_scope_spec.rb
newellista-searchlogic-2.0.8 spec/named_scopes/alias_scope_spec.rb
newellista-searchlogic-2.0.9 spec/named_scopes/alias_scope_spec.rb
skanev-searchlogic-2.1.8.1 spec/named_scopes/alias_scope_spec.rb
searchlogic-2.1.0 spec/named_scopes/alias_scope_spec.rb
searchlogic-2.1.1 spec/named_scopes/alias_scope_spec.rb
searchlogic-2.1.2 spec/named_scopes/alias_scope_spec.rb
searchlogic-2.1.3 spec/named_scopes/alias_scope_spec.rb
searchlogic-2.1.4 spec/named_scopes/alias_scope_spec.rb
searchlogic-2.1.5 spec/named_scopes/alias_scope_spec.rb
searchlogic-2.1.6 spec/named_scopes/alias_scope_spec.rb
searchlogic-2.1.7 spec/named_scopes/alias_scope_spec.rb
searchlogic-2.1.8 spec/named_scopes/alias_scope_spec.rb
searchlogic-2.1.9 spec/named_scopes/alias_scope_spec.rb
searchlogic-2.1.10 spec/named_scopes/alias_scope_spec.rb
searchlogic-2.1.11 spec/named_scopes/alias_scope_spec.rb