Sha256: edf91dbd8a04943be69afbb13e8ea601086a1baf91ef7d32c610c2cf5fd743dc

Contents?: true

Size: 450 Bytes

Versions: 5

Compression:

Stored size: 450 Bytes

Contents

module FixtureBuilder
  class FixturesPath
    def self.absolute_rails_fixtures_path
      File.expand_path(ActiveRecord::Tasks::DatabaseTasks.fixtures_path)
    rescue
      if ENV["FIXTURES_PATH"]
        ENV["FIXTURES_PATH"]
      elsif File.exists?(File.expand_path("spec/fixtures",::Rails.root))
        File.expand_path("spec/fixtures",::Rails.root)
      else
        File.expand_path("test/fixtures",::Rails.root)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fixture_builder-0.5.2.rc3 lib/fixture_builder/fixtures_path.rb
fixture_builder-0.5.2.rc2 lib/fixture_builder/fixtures_path.rb
fixture_builder-0.5.2.rc1 lib/fixture_builder/fixtures_path.rb
fixture_builder-0.5.1 lib/fixture_builder/fixtures_path.rb
fixture_builder-0.5.1.rc4 lib/fixture_builder/fixtures_path.rb