test_orm/support.rb in lolita-file-upload-0.1.4 vs test_orm/support.rb in lolita-file-upload-0.2.0

- old
+ new

@@ -1,27 +1,27 @@ -module Support - class << self - def get_model from - Object.const_get(:"#{from.humanize}") - end - - def file_tab model_name,*args,&block - from=Support.get_model(model_name) - Lolita::Configuration::FilesTab.new(from.lolita.dbi,*args,&block) - end - - def get_file(filename) - File.open(File.expand_path("test_orm/files/"+filename.to_s)) - end - - def load_rails_application - require 'rails' - require 'lolita/rails/all' - require 'lolita-file-upload/rails' - require File.expand_path("test_orm/rails/config/enviroment") - end - end -end - -at_exit do - FileUtils.rm_rf(File.expand_path("uploads")) +module Support + class << self + def get_model from + Object.const_get(:"#{from.humanize}") + end + + def file_tab model_name,*args,&block + from=Support.get_model(model_name) + Lolita::Configuration::FilesTab.new(from.lolita.dbi,*args,&block) + end + + def get_file(filename) + File.open(File.expand_path("test_orm/files/"+filename.to_s)) + end + + def load_rails_application + require 'rails' + require 'lolita/rails/all' + require 'lolita-file-upload/rails' + require File.expand_path("test_orm/rails/config/enviroment") + end + end +end + +at_exit do + FileUtils.rm_rf(File.expand_path("uploads")) end \ No newline at end of file