Sha256: 014d958758474ca056443b475026d3da8c1b18efe2f236cf4aeb9a793f75d0ff
Contents?: true
Size: 855 Bytes
Versions: 47
Compression:
Stored size: 855 Bytes
Contents
require 'test_helper' require 'generators/generators_test_helper' require "generators/angular/controller/controller_generator" class ControllerGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper tests Angular::Generators::ControllerGenerator test "simple controller" do run_generator %w(Post) assert_file "#{angular_path}/controllers/posts.coffee" do |controller| controller_class = Regexp.escape("class @PostsController") assert_match /#{controller_class}/, controller end end test "two word model is camelcased" do run_generator %w(BlogPost) assert_file "#{angular_path}/controllers/blog_posts.coffee" do |controller| controller_class = Regexp.escape("class @BlogPostsController") assert_match /#{controller_class}/, controller end end end
Version data entries
47 entries across 47 versions & 2 rubygems