test/unit/graphviz_test.rb in rails-erd-1.4.7 vs test/unit/graphviz_test.rb in rails-erd-1.5.0

- old
+ new

@@ -104,17 +104,19 @@ test "create should write to file with dot extension without requiring graphviz" do create_simple_domain begin GraphViz.class_eval do alias_method :old_output_and_errors_from_command, :output_and_errors_from_command + undef :output_and_errors_from_command def output_and_errors_from_command(*args); raise end end assert_nothing_raised do Diagram::Graphviz.create(:filetype => :dot) end ensure GraphViz.class_eval do + undef :output_and_errors_from_command alias_method :output_and_errors_from_command, :old_output_and_errors_from_command end end end @@ -135,10 +137,10 @@ Diagram::Graphviz.create(:orientation => :vertical) end test "create should not create output if there are no connected models" do Diagram::Graphviz.create rescue nil - assert !File.exists?("erd.png") + assert !File.exist?("erd.png") end test "create should abort and complain if there are no connected models" do message = nil begin