Sha256: b18efa6e53e7010b2d6ffceaf02dc97ee64f1306a0bf1816746911fb3f438cf5
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
require 'test_helper' require 'generators/ember/controller_generator' class ControllerGeneratorTest < Rails::Generators::TestCase include GeneratorTestSupport tests Ember::Generators::ControllerGenerator destination File.join(Rails.root, "tmp", "generator_test_output") setup :prepare_destination test "array_controller" do run_generator ["post", "--array"] assert_file "#{app_path}/controllers/post.es6" end test "object_controller" do run_generator ["post", "--object"] assert_file "#{app_path}/controllers/post.es6" end test "default_controller" do run_generator ["post"] assert_file "#{app_path}/controllers/post.es6" end test "Assert files are properly created" do run_generator %w(ember) assert_file "#{app_path}/controllers/ember.es6" end test "Uses config.ember.appkit.paths.app" do custom_path = app_path("custom") with_config paths: {app: custom_path} do run_generator ["post", "--object"] assert_file "#{custom_path}/controllers/post.es6" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ember-appkit-rails-0.5.0 | test/generators/controller_generator_test.rb |