Sha256: 9396f8e34b84d7d88f692c22c091422e8ff9635ea2b2b7124f84d0857fa762b7
Contents?: true
Size: 520 Bytes
Versions: 124
Compression:
Stored size: 520 Bytes
Contents
class Object # Returns the name of a fixture file by adjoining the directory # of the +dir+ argument with "fixtures" and the contents of the # +args+ array. For example, # # +dir+ == "some/path" # # and # # +args+ == ["dir", "file.txt"] # # then the result is the expanded path of # # "some/fixtures/dir/file.txt". def fixture(dir, *args) path = File.dirname(dir) path = path[0..-7] if path[-7..-1] == "/shared" File.expand_path(File.join(path, "fixtures", args)) end end
Version data entries
124 entries across 100 versions & 3 rubygems