flunk 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/flunk.gemspec +1 -1
- data/lib/flunk.rb +9 -1
- metadata +1 -1
data/flunk.gemspec
CHANGED
data/lib/flunk.rb
CHANGED
@@ -16,15 +16,23 @@ class Flunk < ActionDispatch::IntegrationTest
|
|
16
16
|
test("FLUNKED: #{action} (#{failure_reason})", &block)
|
17
17
|
end
|
18
18
|
|
19
|
+
def self.base_url=(base_url)
|
20
|
+
@@base_url = base_url
|
21
|
+
end
|
22
|
+
|
19
23
|
def result
|
20
24
|
if !@result_fetched
|
21
25
|
@result_fetched = true
|
22
26
|
|
23
|
-
if
|
27
|
+
if @username || @password
|
24
28
|
@headers ||= {}
|
25
29
|
@headers["HTTP_AUTHORIZATION"] = "Basic #{Base64.encode64(@username.to_s + ":" + @password.to_s)}".strip
|
26
30
|
end
|
27
31
|
|
32
|
+
if @@base_url
|
33
|
+
@path = File.join(@@base_url, @path)
|
34
|
+
end
|
35
|
+
|
28
36
|
send @method, @path, @body, @headers
|
29
37
|
|
30
38
|
@response = response
|