class SingletonTest

  1. test/singleton_test.rb

Methods

Public Instance

  1. test_singleton

Public Instance methods

test_singleton ()
[show source]
# File test/singleton_test.rb, line 26
def test_singleton
  result = RubyProf.profile do
    a = A.new
    a << :first_thing
    assert_equal(1, a.as.size)
  end
  printer = RubyProf::FlatPrinter.new(result)
  output = ENV['SHOW_RUBY_PROF_PRINTER_OUTPUT'] == "1" ? STDOUT : ''
  printer.print(output)
end