diff options
Diffstat (limited to 'test/nodes')
-rw-r--r-- | test/nodes/test_sql_literal.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/nodes/test_sql_literal.rb b/test/nodes/test_sql_literal.rb index 9deb8e5d8d..085c5dad6b 100644 --- a/test/nodes/test_sql_literal.rb +++ b/test/nodes/test_sql_literal.rb @@ -1,4 +1,5 @@ require 'helper' +require 'yaml' module Arel module Nodes @@ -56,6 +57,13 @@ module Arel @visitor.accept(node).must_be_like %{ (foo = 1 AND foo = 2) } end end + + describe 'serialization' do + it 'serializes into YAML' do + yaml_literal = SqlLiteral.new('foo').to_yaml + assert_equal('foo', YAML.load(yaml_literal)) + end + end end end end |