Included Modules

Ammeter::RSpec::Rails::GeneratorExampleGroup

Delegates to Rails::Generators::TestCase to work with RSpec.

Constants

DELEGATED_METHODS

Public Instance Methods

file(relative) click to toggle source
# File lib/ammeter/rspec/generator/example/generator_example_group.rb, line 70
def file relative
  File.expand_path(relative, destination_root)
end
migration_file(relative) click to toggle source
# File lib/ammeter/rspec/generator/example/generator_example_group.rb, line 73
def migration_file relative
  file_path = file(relative)
  migration_file = Dir.glob("#{File.dirname(file_path)}/[0-9]*_#{File.basename(file_path)}").first
  migration_file = "#{File.dirname(file_path)}/TIMESTAMP_#{File.basename(file_path)}" if migration_file.nil?
  migration_file
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.