Sha256: a4d5fcfcad65bc7b3ab77a097ee9bdec722a832cca7be81bf8e42972462468db
Contents?: true
Size: 1.48 KB
Versions: 1
Compression:
Stored size: 1.48 KB
Contents
# frozen_string_literal: true require 'test_helper' require 'rails/generators/test_case' require 'generators/test_unit/repository/repository_generator' module TestUnit module Generators class RepositoryGeneratorTest < Rails::Generators::TestCase tests RepositoryGenerator destination File.expand_path('tmp') setup :prepare_destination test 'generate Repository test file' do run_generator(['article']) assert_file 'test/repositories/article_repository_test.rb', <<~RUBY # frozen_string_literal: true require 'test_helper' class ArticleRepositoryTest < ActiveSupport::TestCase end RUBY end test 'generate Repository test file when suffix is specified' do run_generator(['ArticleRepository']) assert_file 'test/repositories/article_repository_test.rb', <<~RUBY # frozen_string_literal: true require 'test_helper' class ArticleRepositoryTest < ActiveSupport::TestCase end RUBY end test 'generate namespaced Repository test file' do run_generator(['articles/article']) assert_file 'test/repositories/articles/article_repository_test.rb', <<~RUBY # frozen_string_literal: true require 'test_helper' module Articles class ArticleRepositoryTest < ActiveSupport::TestCase end end RUBY end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
upgrow-0.0.5 | test/test_unit/generators/repository_generator_test.rb |