Module: HttpTest
- Defined in:
- lib/http-test.rb,
lib/http-test/version.rb
Defined Under Namespace
Modules: HttpMethods, Server, TestUnitAdapter
Classes: TestCase
Constant Summary
collapse
- PORT =
4444
- VERSION =
"0.1.0"
Class Method Summary
collapse
Class Method Details
.test_server(command) ⇒ Object
16
17
18
19
|
# File 'lib/http-test.rb', line 16
def self.test_server(command)
Server.start!(command)
url_base "http://localhost:#{PORT}"
end
|
.url_base(url_base = nil) ⇒ Object
7
8
9
10
11
12
13
14
|
# File 'lib/http-test.rb', line 7
def self.url_base(url_base = nil)
@url_base = url_base if url_base
return @url_base if @url_base
STDERR.puts "Either define a API endpoint via url_base <url>, or define a command to start a test_server via test_server \"command\"'\n MSG\n exit 1\nend\n"
|