Module: Zygote::TestConfig

Extended by:
TestConfig
Included in:
TestConfig
Defined in:
lib/zygote/test.rb

Overview

Helper to set up test config

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cellsObject (readonly)

Returns the value of attribute cells.



14
15
16
# File 'lib/zygote/test.rb', line 14

def cells
  @cells
end

#config_pathObject (readonly)

Returns the value of attribute config_path.



14
15
16
# File 'lib/zygote/test.rb', line 14

def config_path
  @config_path
end

#fixturesObject (readonly)

Returns the value of attribute fixtures.



14
15
16
# File 'lib/zygote/test.rb', line 14

def fixtures
  @fixtures
end

#portObject (readonly)

Returns the value of attribute port.



14
15
16
# File 'lib/zygote/test.rb', line 14

def port
  @port
end

Instance Method Details

#setup(fixtures: nil, config_path: nil, cells: nil, port: nil) ⇒ Object



15
16
17
18
19
20
# File 'lib/zygote/test.rb', line 15

def setup(fixtures: nil, config_path: nil, cells: nil, port: nil)
  @fixtures = fixtures || File.expand_path('../../../spec/fixtures', __FILE__)
  @config_path = config_path || File.join(@fixtures, 'cells.yml')
  @cells = cells || File.join(@fixtures, 'cells')
  @port = port || 7000
end