Class: RailsProof::TestGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/rails_proof/test/test_generator.rb

Constant Summary collapse

ASSOCIATION_MACROS =
%w[
  belongs_to
  has_many
  has_one
  has_and_belongs_to_many
].freeze

Instance Method Summary collapse

Instance Method Details

#run_rails_proofObject



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/generators/rails_proof/test/test_generator.rb', line 29

def run_rails_proof
  say "RailsProof targets: #{targets.count}"

  if targets.empty?
    say "No supported targets found."
    return
  end

  targets.each_with_index do |target, index|
    say "" if index.positive?
    process_target(target)
  end
end