spec/spec_generator_helper.rb in bret-watircraft-0.4.1 vs spec/spec_generator_helper.rb in bret-watircraft-0.4.2
- old
+ new
@@ -8,19 +8,12 @@
RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__), "..", "watircraft_generators"))]
end
module Helpers
module Generator
- def generate_site(site_name)
- site_name = "#{site_name}#{Time.now.to_i}"
- run_generator('site', [site_name], generator_sources)
- site_file_path = File.join(PROJECT_FOLDER,'lib',"#{site_name.underscore}.rb")
- require site_file_path
- "::#{site_name.camelize}::#{site_name.camelize}".constantize.any_instance.stubs(:base_path).returns(PROJECT_FOLDER)
- site_name.camelize.constantize
- end
- def generate_project
- run_generator('watircraft', [APP_ROOT], generator_sources)
+ def generate_project options=[]
+ generator_args = [APP_ROOT] + options
+ run_generator('watircraft', generator_args, generator_sources)
::Taza::Settings.stubs(:path).returns(APP_ROOT)
end
end
module Taza