aboutsummaryrefslogtreecommitdiffstats
path: root/spec/algebra/unit/predicates/inequality_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/algebra/unit/predicates/inequality_spec.rb')
-rw-r--r--spec/algebra/unit/predicates/inequality_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/algebra/unit/predicates/inequality_spec.rb b/spec/algebra/unit/predicates/inequality_spec.rb
new file mode 100644
index 0000000000..557494e2cd
--- /dev/null
+++ b/spec/algebra/unit/predicates/inequality_spec.rb
@@ -0,0 +1,26 @@
+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 '==' 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