diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-01-25 14:47:47 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-01-25 14:48:11 -0700 |
commit | d36a769234911c8374e09069eb054d4c60eb1b99 (patch) | |
tree | a0eaae5512eb087d47709c0b5c843c940aaf0793 /test/nodes/test_bind_param.rb | |
parent | 9d773cd116601002a2121d6c3858cd0660c87bb0 (diff) | |
download | rails-d36a769234911c8374e09069eb054d4c60eb1b99.tar.gz rails-d36a769234911c8374e09069eb054d4c60eb1b99.tar.bz2 rails-d36a769234911c8374e09069eb054d4c60eb1b99.zip |
Implement equality for `BindParam`
It is impossible to test equality of things constructing trees with bind
params otherwise.
Diffstat (limited to 'test/nodes/test_bind_param.rb')
-rw-r--r-- | test/nodes/test_bind_param.rb | 15 |
1 files changed, 15 insertions, 0 deletions
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 |