Module: FileFixture

Included in:
Test::Unit::TestCase
Defined in:
lib/file_fixture.rb

Constant Summary collapse

FIXTURE_DIR =
nil

Instance Method Summary collapse

Instance Method Details

#file_fixture(name) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/file_fixture.rb', line 4

def file_fixture(name)
  if FIXTURE_DIR
    File.read(File.join(::FileFixture::FIXTURE_DIR, name))
  else
    raise "FileFixture::FIXTURE_DIR needs to be defined"
  end
end