blob: f95b8d120ec80c5bb6e19b7f75a273fd13348588 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
require 'spec_helper'
module Arel
module Predicates
describe Inequality do
before do
relation1 = Arel::Table.new(:users)
relation2 = Arel::Table.new(:photos)
left = relation1[:id]
right = relation2[:user_id]
@a = Inequality.new(left, right)
@b = Inequality.new(right, left)
end
describe 'operator' do
it "should have one" do
@a.operator.should == :"!="
end
end
describe '==' do
it "is equal to itself" do
@a.should == @a
end
it "should not care abount children order" do
@a.should == @b
end
end
end
end
end
|