test/support/generator_test_support.rb in ember-appkit-rails-0.2.2 vs test/support/generator_test_support.rb in ember-appkit-rails-0.3.0

- old
+ new

@@ -1,13 +1,11 @@ require 'pathname' module GeneratorTestSupport # def run_generator(args=self.default_arguments, config={}) - # # capture(:stdout) do - # args += ['--skip-bundle'] unless args.include? '--dev' - # self.generator_class.start(args, config.reverse_merge(destination_root: destination_root)) - # # end + # args += ['--skip-bundle'] unless args.include? '--dev' + # self.generator_class.start(args, config.reverse_merge(destination_root: destination_root)) # end def prepare_destination super @@ -28,29 +26,29 @@ FileUtils.mkdir_p tmp_destination.join('app','views', 'layouts') FileUtils.cp 'test/fixtures/rails_4-0-0_application_layout', tmp_destination.join('app','views','layouts', 'application.html.erb') end def with_config(options = {}) - original_values = ::Rails.configuration.ember.appkit.clone + original_values = ::Rails.configuration.ember.clone original_values.paths = original_values.paths.clone original_values.paths.app = original_values.paths.app.clone original_values.paths.config = original_values.paths.config.clone options.each do |key, value| if Hash === value value.each do |k, v| - ::Rails.configuration.ember.appkit[key][k] = v + ::Rails.configuration.ember[key][k] = v end else - ::Rails.configuration.ember.appkit[key] = value + ::Rails.configuration.ember[key] = value end end yield ensure - ::Rails.configuration.ember.appkit.clear - ::Rails.configuration.ember.appkit = original_values + ::Rails.configuration.ember.clear + ::Rails.configuration.ember = original_values end def assert_new_dirs(options = {}) path = options[:in_path] || app_path @@ -63,10 +61,10 @@ def application_name "App" end def app_path(path = 'app') - path + path end def config_path(path = 'config') path end