Class: Rspec::BluePrintGenerator

Inherits:
BluePrint::Generators::Base show all
Defined in:
lib/generators/rspec/blue_print_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_behavior_filesObject



13
14
15
16
17
18
19
# File 'lib/generators/rspec/blue_print_generator.rb', line 13

def create_behavior_files
  each_with_role do |role|
    template 'role_spec.rb', File.join(
      'spec/blue_prints', class_path, "#{file_name}_context", "#{role.downcase}_spec.rb"
    )
  end
end

#create_context_spec_fileObject



7
8
9
10
11
# File 'lib/generators/rspec/blue_print_generator.rb', line 7

def create_context_spec_file
  template 'context_spec.rb', File.join(
    'spec/blue_prints', class_path, "#{singular_name}_context_spec.rb"
  )
end