diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-19 07:59:12 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-19 07:59:12 -0300 |
commit | f6ab8cf4bb3040d7244d58729cb44f412bd1c40a (patch) | |
tree | 4fdd5a16f0cbe370af74064b5a4663a04fa3a6a0 /test | |
parent | be9963ac233430b70b94277d8f1d472251b88217 (diff) | |
parent | acdd8e4f08e230926a7174903cf905e8a415a1d4 (diff) | |
download | rails-f6ab8cf4bb3040d7244d58729cb44f412bd1c40a.tar.gz rails-f6ab8cf4bb3040d7244d58729cb44f412bd1c40a.tar.bz2 rails-f6ab8cf4bb3040d7244d58729cb44f412bd1c40a.zip |
Merge pull request #267 from jordansexton/patch-1
Return self from distinct so it's chainable
Diffstat (limited to 'test')
-rw-r--r-- | test/test_select_manager.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_select_manager.rb b/test/test_select_manager.rb index 837486fb46..611bba10c2 100644 --- a/test/test_select_manager.rb +++ b/test/test_select_manager.rb @@ -1073,6 +1073,12 @@ module Arel manager.distinct(false) manager.ast.cores.last.set_quantifier.must_equal nil end + + it "chains" do + manager = Arel::SelectManager.new Table.engine + manager.distinct.must_equal manager + manager.distinct(false).must_equal manager + end end end end |