aaronmallen/activeinteractor

View on GitHub
lib/rails/generators/interactor/context/test_unit_generator.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

require 'rails/generators/active_interactor/base'

module Interactor
  module Context
    module Generators
      class TestUnitGenerator < ActiveInteractor::Generators::NamedBase
        desc 'Generate an interactor context unit test'

        def create_spec
          template 'context_test_unit.erb', active_interactor_file(parent_dir: 'test', suffix: 'context_test')
        end
      end
    end
  end
end