Skip to content

Commit

Permalink
Merge pull request #425 from vipulnsward/fix-warnings
Browse files Browse the repository at this point in the history
Fix warnings from test_to_sql test
  • Loading branch information
rafaelfranca committed Apr 11, 2016
2 parents 7a5faf5 + 91b593d commit 1659fdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/visitors/test_to_sql.rb
Expand Up @@ -695,7 +695,7 @@ def quote value, column = nil
it 'supports #when with two arguments and no #then' do
node = Arel::Nodes::Case.new @table[:name]

{ foo: 1, bar: 0 }.reduce(node) { |node, pair| node.when *pair }
{ foo: 1, bar: 0 }.reduce(node) { |_node, pair| _node.when(*pair) }

compile(node).must_be_like %{
CASE "users"."name" WHEN 'foo' THEN 1 WHEN 'bar' THEN 0 END
Expand Down

0 comments on commit 1659fdc

Please sign in to comment.