class FixtureBuilder::FixturesPath

Public Class Methods

absolute_rails_fixtures_path() click to toggle source
# File lib/fixture_builder/fixtures_path.rb, line 3
def self.absolute_rails_fixtures_path
  File.expand_path(ActiveRecord::Tasks::DatabaseTasks.fixtures_path)
rescue
  if ENV["FIXTURES_PATH"]
    ENV["FIXTURES_PATH"]
  elsif File.exist?(File.expand_path("spec/fixtures",::Rails.root))
    File.expand_path("spec/fixtures",::Rails.root)
  else
    File.expand_path("test/fixtures",::Rails.root)
  end
end