From d36a769234911c8374e09069eb054d4c60eb1b99 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Sun, 25 Jan 2015 14:47:47 -0700 Subject: Implement equality for `BindParam` It is impossible to test equality of things constructing trees with bind params otherwise. --- test/nodes/test_bind_param.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/nodes/test_bind_param.rb (limited to 'test/nodes') diff --git a/test/nodes/test_bind_param.rb b/test/nodes/test_bind_param.rb new file mode 100644 index 0000000000..ea008f4c99 --- /dev/null +++ b/test/nodes/test_bind_param.rb @@ -0,0 +1,15 @@ +require 'helper' + +module Arel + module Nodes + describe 'BindParam' do + it 'is equal to other bind params' do + BindParam.new.must_equal(BindParam.new) + end + + it 'is not equal to other nodes' do + BindParam.new.wont_equal(Node.new) + end + end + end +end -- cgit v1.2.3