class TestSquad::Configuration
Attributes
framework[RW]
Set the enabled JavaScript library.
phantomjs_bin[W]
Set the phantomjs bin path. This can also be set through the TEST_SQUAD_PHANTOMJS_BIN env var. It defaults to `phantomjs`.
server_host[W]
Set the test server host. This can also be set through the TEST_SQUAD_SERVER_HOST env var. It defaults to `127.0.0.1`
server_path[W]
Set the test server path. You may map the tests path to something else. This change must be reflected here. This can also be set through the TEST_SQUAD_SERVER_PATH env var. It defaults to `/tests`.
server_port[W]
Set the test server port. This can also be set through the TEST_SQUAD_SERVER_PORT env var. It defaults to `42424`
timeout[W]
Set the test timeout. This can also be set through the TEST_SQUAD_TIMEOUT env var. It defaults to `10` seconds.
Public Instance Methods
phantomjs_bin()
click to toggle source
# File lib/test_squad/configuration.rb, line 37 def phantomjs_bin get_value("TEST_SQUAD_PHANTOMJS_BIN", __method__, "phantomjs") end
server_host()
click to toggle source
# File lib/test_squad/configuration.rb, line 41 def server_host get_value("TEST_SQUAD_SERVER_HOST", __method__, "127.0.0.1") end
server_path()
click to toggle source
# File lib/test_squad/configuration.rb, line 49 def server_path get_value("TEST_SQUAD_SERVER_PATH", __method__, "/tests") end
server_port()
click to toggle source
# File lib/test_squad/configuration.rb, line 45 def server_port get_value("TEST_SQUAD_SERVER_PORT", __method__, 42_424) end
server_uri()
click to toggle source
# File lib/test_squad/configuration.rb, line 33 def server_uri File.join("http://#{server_host}:#{server_port}", server_path) end
timeout()
click to toggle source
# File lib/test_squad/configuration.rb, line 53 def timeout get_value("TEST_SQUAD_TIMEOUT", __method__, 10) end
Private Instance Methods
get_value(env_var, option_name, default_value)
click to toggle source
# File lib/test_squad/configuration.rb, line 59 def get_value(env_var, option_name, default_value) ENV[env_var] || instance_variable_get("@#{option_name}") || default_value end