mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add failing test for Dot visitor and BindParam
Since BindParam has no value, treating it like a string causes it to fallback to Object#to_s, leading to output like `#<Arel::Nodes::BindParam:0x007fa43c866108>`. Since angle brackets are significant in Dot labels, this causes `Error: bad label format` when passing the graph into dot.
This commit is contained in:
parent
09827f361d
commit
b7e91eff47
1 changed files with 6 additions and 0 deletions
|
@ -70,6 +70,12 @@ module Arel
|
|||
@visitor.accept binary, Collectors::PlainString.new
|
||||
end
|
||||
end
|
||||
|
||||
def test_Arel_Nodes_BindParam
|
||||
node = Arel::Nodes::BindParam.new
|
||||
collector = Collectors::PlainString.new
|
||||
assert_match '[label="<f0>Arel::Nodes::BindParam"]', @visitor.accept(node, collector).value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue