File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def must_be_like other
1414
1515# Useful for debugging Arel.
1616# You can call it like arel_to_png(User.where(name: "foo").arel)
17- def arel_to_png ( arel )
17+ def arel_to_png ( arel , file_name = "query" )
1818 graph = GraphViz . parse_string ( arel . to_dot )
19- graph . output ( :png => "query .png" )
19+ graph . output ( :png => "#{ file_name } .png" )
2020end
Original file line number Diff line number Diff line change 1313require 'bundler'
1414Bundler . setup
1515require 'simplecov'
16+ SimpleCov . start do
17+ add_filter "/test/"
18+ end
1619require 'graphviz'
1720require 'mocha/api'
1821require 'active_support/dependencies'
2528require 'models/topic'
2629require 'cases/arel_helper'
2730
28- SimpleCov . start do
29- add_filter "/test/"
30- end
31-
3231GC . copy_on_write_friendly = true if GC . respond_to? ( :copy_on_write_friendly? )
3332
3433ActiveRecord ::Migration . verbose = false
You can’t perform that action at this time.
0 commit comments