aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-06 17:39:09 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-06 17:39:09 -0700
commit87b685680669d13bf9ce879fa0037784150e8b62 (patch)
tree2addf3417458a7e9e2f24fb4d2b4ca70a0e38672 /spec
parent458f9c43603df319625f1db0939635af13a85d43 (diff)
downloadrails-87b685680669d13bf9ce879fa0037784150e8b62.tar.gz
rails-87b685680669d13bf9ce879fa0037784150e8b62.tar.bz2
rails-87b685680669d13bf9ce879fa0037784150e8b62.zip
adding backwards compat methods
Diffstat (limited to 'spec')
-rw-r--r--spec/arel/nodes/equality_spec.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/arel/nodes/equality_spec.rb b/spec/arel/nodes/equality_spec.rb
index d91fa0df03..d9edc352f3 100644
--- a/spec/arel/nodes/equality_spec.rb
+++ b/spec/arel/nodes/equality_spec.rb
@@ -1,6 +1,33 @@
module Arel
module Nodes
describe 'equality' do
+ # FIXME: backwards compat
+ describe 'backwards compat' do
+ describe 'operator' do
+ it 'returns :==' do
+ attr = Table.new(:users)[:id]
+ left = attr.eq(10)
+ check left.operator.should == :==
+ end
+ end
+
+ describe 'operand1' do
+ it "should equal left" do
+ attr = Table.new(:users)[:id]
+ left = attr.eq(10)
+ check left.left.should == left.operand1
+ end
+ end
+
+ describe 'operand2' do
+ it "should equal right" do
+ attr = Table.new(:users)[:id]
+ left = attr.eq(10)
+ check left.right.should == left.operand2
+ end
+ end
+ end
+
describe 'or' do
it 'makes an OR node' do
attr = Table.new(:users)[:id]