Module: Fixtory

Defined in:
lib/fixtory.rb,
lib/fixtory/version.rb

Defined Under Namespace

Modules: DSL, Methods

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.identity_mapObject



24
25
26
# File 'lib/fixtory.rb', line 24

def self.identity_map
  @identity_map ||= {}
end

.pathObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/fixtory.rb', line 4

def self.path
  unless @path
    if File.exist?('test/fixtories')
      @path = 'test/fixtories'
    elsif File.exist?('spec/fixtories')
      @path = 'spec/fixtories'
    end
  end

  @path
end

.path=(path) ⇒ Object



16
17
18
# File 'lib/fixtory.rb', line 16

def self.path=(path)
  @path = path
end

.path_for(group_name) ⇒ Object



20
21
22
# File 'lib/fixtory.rb', line 20

def self.path_for(group_name)
  File.join(path, "#{group_name}.rb")
end