diff options
Diffstat (limited to 'spec/arel/algebra/unit/relations/alias_spec.rb')
-rw-r--r-- | spec/arel/algebra/unit/relations/alias_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/arel/algebra/unit/relations/alias_spec.rb b/spec/arel/algebra/unit/relations/alias_spec.rb new file mode 100644 index 0000000000..a5d716a638 --- /dev/null +++ b/spec/arel/algebra/unit/relations/alias_spec.rb @@ -0,0 +1,16 @@ +require File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'spec_helper') + +module Arel + describe Alias do + before do + @relation = Table.new(:users) + end + + describe '==' do + it "obtains if the objects are the same" do + Alias.new(@relation).should_not == Alias.new(@relation) + (aliaz = Alias.new(@relation)).should == aliaz + end + end + end +end |