aboutsummaryrefslogtreecommitdiffstats
path: root/spec/active_relation/unit/primitives/attribute_spec.rb
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-03-16 16:17:13 -0700
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-03-16 16:17:13 -0700
commit07f7f752fecb56316456f144c121e471fd0d0847 (patch)
treeefe4da65736e808ecae0c7850e4d1fe32470c037 /spec/active_relation/unit/primitives/attribute_spec.rb
parentaf3d7c5193eee90ad17b1ba8aaf5d76a2874c0a5 (diff)
downloadrails-07f7f752fecb56316456f144c121e471fd0d0847.tar.gz
rails-07f7f752fecb56316456f144c121e471fd0d0847.tar.bz2
rails-07f7f752fecb56316456f144c121e471fd0d0847.zip
renamed operators
- equals / eq - greater_than / gt - etc.
Diffstat (limited to 'spec/active_relation/unit/primitives/attribute_spec.rb')
-rw-r--r--spec/active_relation/unit/primitives/attribute_spec.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/active_relation/unit/primitives/attribute_spec.rb b/spec/active_relation/unit/primitives/attribute_spec.rb
index bdd22721b3..a0f6cde8f7 100644
--- a/spec/active_relation/unit/primitives/attribute_spec.rb
+++ b/spec/active_relation/unit/primitives/attribute_spec.rb
@@ -16,7 +16,7 @@ module ActiveRelation
describe '#bind' do
it "manufactures an attribute with the relation bound and self as an ancestor" do
- derived_relation = @relation.select(@relation[:id].equals(1))
+ derived_relation = @relation.select(@relation[:id].eq(1))
@attribute.bind(derived_relation).should == Attribute.new(derived_relation, @attribute.name, :ancestor => @attribute)
end
@@ -95,33 +95,33 @@ module ActiveRelation
@attribute = Attribute.new(@relation, :name)
end
- describe '#equals' do
+ describe '#eq' do
it "manufactures an equality predicate" do
- @attribute.equals('name').should == Equality.new(@attribute, 'name')
+ @attribute.eq('name').should == Equality.new(@attribute, 'name')
end
end
- describe '#less_than' do
+ describe '#lt' do
it "manufactures a less-than predicate" do
- @attribute.less_than(10).should == LessThan.new(@attribute, 10)
+ @attribute.lt(10).should == LessThan.new(@attribute, 10)
end
end
- describe '#less_than_or_equal_to' do
+ describe '#lteq' do
it "manufactures a less-than or equal-to predicate" do
- @attribute.less_than_or_equal_to(10).should == LessThanOrEqualTo.new(@attribute, 10)
+ @attribute.lteq(10).should == LessThanOrEqualTo.new(@attribute, 10)
end
end
- describe '#greater_than' do
+ describe '#gt' do
it "manufactures a greater-than predicate" do
- @attribute.greater_than(10).should == GreaterThan.new(@attribute, 10)
+ @attribute.gt(10).should == GreaterThan.new(@attribute, 10)
end
end
- describe '#greater_than_or_equal_to' do
+ describe '#gteq' do
it "manufactures a greater-than or equal-to predicate" do
- @attribute.greater_than_or_equal_to(10).should == GreaterThanOrEqualTo.new(@attribute, 10)
+ @attribute.gteq(10).should == GreaterThanOrEqualTo.new(@attribute, 10)
end
end