Module: Kernel

Defined in:
lib/padrino-cms/test/helper.rb

Instance Method Summary collapse

Instance Method Details

#load_fixture(file) ⇒ Object



16
17
18
19
20
21
# File 'lib/padrino-cms/test/helper.rb', line 16

def load_fixture(file)
  Object.send(:remove_const, :Account) if defined?(Account)
  Object.send(:remove_const, :Category) if defined?(Category)
  file += ".rb" if file !~ /.rb$/
  capture_io { load File.join(File.dirname(__FILE__), "fixtures", file) }
end