class ActiveRecord::FixtureBuilder::Configuration

Attributes

builders_path[W]
excluded_tables[RW]
fixtures_path[W]
root[W]

Public Class Methods

new() click to toggle source
# File lib/active_record/fixture_builder/configuration.rb, line 9
def initialize
  @excluded_tables = %w{schema_migrations}
end

Public Instance Methods

builders_path() click to toggle source
# File lib/active_record/fixture_builder/configuration.rb, line 28
def builders_path
  Pathname(@builders_path || root.join('spec/fixture_builders'))
end
connection() click to toggle source
# File lib/active_record/fixture_builder/configuration.rb, line 32
def connection
  @connection || ::ActiveRecord::Base.connection
end
fixtures_path() click to toggle source
# File lib/active_record/fixture_builder/configuration.rb, line 24
def fixtures_path
  Pathname(@fixtures_path || root.join('spec/fixtures'))
end
inspect() click to toggle source
Calls superclass method
# File lib/active_record/fixture_builder/configuration.rb, line 36
def inspect
  super.split(/ |>/).first+'>'
end
root() click to toggle source
# File lib/active_record/fixture_builder/configuration.rb, line 13
def root
  Pathname @root || case
  when defined? Bundler
    Bundler.root
  when defined? Rails
    Rails.root
  else
    Dir.pwd
  end
end