http_stub 0.24.3 → 0.25.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/http_stub.rb +8 -2
- data/lib/http_stub/server/application/application.rb +16 -4
- data/lib/http_stub/server/request/request.rb +6 -1
- data/lib/http_stub/server/response.rb +5 -3
- data/lib/http_stub/server/scenario/controller.rb +2 -2
- data/lib/http_stub/server/scenario/parser.rb +1 -3
- data/lib/http_stub/server/stub/controller.rb +8 -6
- data/lib/http_stub/server/stub/empty.rb +9 -5
- data/lib/http_stub/server/stub/match/controller.rb +22 -0
- data/lib/http_stub/server/stub/match/{result.rb → match.rb} +9 -1
- data/lib/http_stub/server/stub/match/miss.rb +19 -0
- data/lib/http_stub/server/stub/match/rules.rb +33 -0
- data/lib/http_stub/server/stub/parser.rb +1 -1
- data/lib/http_stub/server/stub/payload.rb +20 -0
- data/lib/http_stub/server/stub/payload/base_uri_modifier.rb +17 -0
- data/lib/http_stub/server/stub/payload/response_body_modifier.rb +19 -0
- data/lib/http_stub/server/stub/response/base.rb +5 -1
- data/lib/http_stub/server/stub/response/file.rb +5 -0
- data/lib/http_stub/server/stub/response/text.rb +4 -0
- data/lib/http_stub/server/stub/stub.rb +8 -18
- data/lib/http_stub/server/stub/triggers.rb +1 -1
- data/lib/http_stub/server/views/_activate_scenario.haml +17 -4
- data/lib/http_stub/server/views/_stub.haml +2 -2
- data/lib/http_stub/server/views/{_match.haml → _stub_match.haml} +1 -1
- data/lib/http_stub/server/views/_stub_miss.haml +3 -0
- data/lib/http_stub/server/views/index.haml +4 -2
- data/lib/http_stub/server/views/stub_matches.haml +4 -0
- data/lib/http_stub/server/views/stub_misses.haml +4 -0
- data/lib/http_stub/version.rb +1 -1
- data/spec/acceptance/stub_match_last_spec.rb +170 -0
- data/spec/acceptance/stub_match_list_spec.rb +115 -0
- data/spec/acceptance/stub_miss_list_spec.rb +58 -0
- data/spec/lib/http_stub/server/application/application_spec.rb +57 -13
- data/spec/lib/http_stub/server/request/request_spec.rb +41 -1
- data/spec/lib/http_stub/server/response_spec.rb +18 -12
- data/spec/lib/http_stub/server/scenario/controller_spec.rb +4 -4
- data/spec/lib/http_stub/server/scenario/parser_spec.rb +30 -27
- data/spec/lib/http_stub/server/stub/controller_spec.rb +45 -26
- data/spec/lib/http_stub/server/stub/empty_spec.rb +14 -14
- data/spec/lib/http_stub/server/stub/match/controller_spec.rb +69 -0
- data/spec/lib/http_stub/server/stub/match/match_spec.rb +146 -0
- data/spec/lib/http_stub/server/stub/match/miss_spec.rb +15 -0
- data/spec/lib/http_stub/server/stub/match/rules_spec.rb +247 -0
- data/spec/lib/http_stub/server/stub/parser_spec.rb +12 -14
- data/spec/lib/http_stub/server/stub/payload/base_uri_modifier_spec.rb +23 -0
- data/spec/lib/http_stub/server/{payload_file_consolidator_spec.rb → stub/payload/response_body_modifier_spec.rb} +22 -14
- data/spec/lib/http_stub/server/stub/payload_spec.rb +33 -0
- data/spec/lib/http_stub/server/stub/response/base_spec.rb +22 -0
- data/spec/lib/http_stub/server/stub/response/file_spec.rb +29 -1
- data/spec/lib/http_stub/server/stub/response/text_spec.rb +18 -0
- data/spec/lib/http_stub/server/stub/stub_spec.rb +48 -145
- data/spec/lib/http_stub/server/stub/triggers_spec.rb +14 -0
- data/spec/spec_helper.rb +7 -3
- data/spec/support/{configurer_integration.rb → http_stub/configurer_integration.rb} +3 -2
- data/spec/support/http_stub/html_view_excluding_request_details.rb +11 -0
- data/spec/support/http_stub/html_view_including_request_details.rb +47 -0
- data/spec/support/http_stub/server/scenario/scenario_fixture.rb +1 -1
- data/spec/support/http_stub/server/stub/match/match_fixture.rb +21 -0
- data/spec/support/http_stub/server/stub/match/miss_fixture.rb +17 -0
- data/spec/support/{server_integration.rb → http_stub/server_integration.rb} +0 -0
- data/spec/support/http_stub/stub_fixture.rb +1 -0
- data/spec/support/http_stub/stub_registrator.rb +83 -0
- metadata +47 -19
- data/lib/http_stub/server/stub/payload_file_consolidator.rb +0 -18
- data/lib/http_stub/server/views/_miss.haml +0 -7
- data/lib/http_stub/server/views/match_results.haml +0 -7
- data/spec/acceptance/stub_match_spec.rb +0 -252
- data/spec/lib/http_stub/server/stub/match/result_spec.rb +0 -33
- data/spec/support/http_stub/server/stub/match/result_fixture.rb +0 -19
@@ -41,6 +41,20 @@ describe HttpStub::Server::Stub::Triggers do
|
|
41
41
|
|
42
42
|
end
|
43
43
|
|
44
|
+
describe "#as_json" do
|
45
|
+
|
46
|
+
let(:stub_hashes) { (1..stubs_for_triggers.length).map { |i| { "stub_#{i}" => "value #{i}" } } }
|
47
|
+
|
48
|
+
before(:example) do
|
49
|
+
stubs_for_triggers.zip(stub_hashes).each { |stub, hash| allow(stub).to receive(:to_hash).and_return(hash) }
|
50
|
+
end
|
51
|
+
|
52
|
+
it "returns an array containing the hash representation of each stub" do
|
53
|
+
expect(stub_triggers.as_json).to eql(stub_hashes)
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
44
58
|
describe "#to_s" do
|
45
59
|
|
46
60
|
let(:trigger_strings) { (1..stubs_for_triggers.length).map { |i| "trigger string ##{i}" } }
|
data/spec/spec_helper.rb
CHANGED
@@ -37,11 +37,15 @@ require_relative 'support/cross_origin_server/integration'
|
|
37
37
|
require_relative 'support/cross_origin_server/index_page'
|
38
38
|
require_relative 'support/http_stub/server/request_fixture'
|
39
39
|
require_relative 'support/http_stub/server/scenario/scenario_fixture'
|
40
|
-
require_relative 'support/http_stub/server/stub/match/
|
40
|
+
require_relative 'support/http_stub/server/stub/match/match_fixture'
|
41
|
+
require_relative 'support/http_stub/server/stub/match/miss_fixture'
|
41
42
|
require_relative 'support/http_stub/stub_fixture'
|
42
43
|
require_relative 'support/http_stub/scenario_fixture'
|
43
44
|
require_relative 'support/http_stub/empty_configurer'
|
45
|
+
require_relative 'support/http_stub/server_integration'
|
46
|
+
require_relative 'support/http_stub/configurer_integration'
|
47
|
+
require_relative 'support/http_stub/stub_registrator'
|
44
48
|
require_relative 'support/html_helpers'
|
49
|
+
require_relative 'support/http_stub/html_view_including_request_details'
|
50
|
+
require_relative 'support/http_stub/html_view_excluding_request_details'
|
45
51
|
require_relative 'support/browser_integration'
|
46
|
-
require_relative 'support/server_integration'
|
47
|
-
require_relative 'support/configurer_integration'
|
@@ -1,8 +1,9 @@
|
|
1
1
|
shared_context "configurer integration" do
|
2
2
|
include_context "server integration"
|
3
3
|
|
4
|
-
let(:configurer)
|
5
|
-
let(:stub_server)
|
4
|
+
let(:configurer) { HttpStub::EmptyConfigurer }
|
5
|
+
let(:stub_server) { configurer.stub_server }
|
6
|
+
let(:stub_registrator) { HttpStub::StubRegistrator.new(stub_server) }
|
6
7
|
|
7
8
|
before(:example) do
|
8
9
|
stub_server.host = server_host
|
@@ -0,0 +1,11 @@
|
|
1
|
+
shared_context "HTML view excluding request details" do
|
2
|
+
|
3
|
+
it "returns a 200 response" do
|
4
|
+
expect(response.code).to eql(200)
|
5
|
+
end
|
6
|
+
|
7
|
+
it "returns a response body that does not include the request" do
|
8
|
+
expect(response.body).to_not include(escape_html(stub_registrator.request_uri))
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
shared_context "HTML view including request details" do
|
2
|
+
|
3
|
+
it "returns a 200 response" do
|
4
|
+
expect(response.code).to eql(200)
|
5
|
+
end
|
6
|
+
|
7
|
+
it "returns a response body that contains the uri of the request" do
|
8
|
+
expect(response.body).to include(escape_html(stub_registrator.request_body))
|
9
|
+
end
|
10
|
+
|
11
|
+
it "returns a response body that contains the method of the request" do
|
12
|
+
expect(response.body).to include(escape_html(stub_registrator.request_method))
|
13
|
+
end
|
14
|
+
|
15
|
+
it "returns a response body that contains the headers of the request whose names are in uppercase" do
|
16
|
+
stub_registrator.request_headers.each do |expected_header_key, expected_header_value|
|
17
|
+
expect(response.body).to include("#{expected_header_key.upcase}:#{expected_header_value}")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
context "when the request contains parameters" do
|
22
|
+
|
23
|
+
def configure_stub_registrator
|
24
|
+
stub_registrator.with_request_parameters
|
25
|
+
end
|
26
|
+
|
27
|
+
it "returns a response body that contains the parameters" do
|
28
|
+
stub_registrator.request_parameters.each do |expected_parameter_key, expected_parameter_value|
|
29
|
+
expect(response.body).to include("#{expected_parameter_key}=#{expected_parameter_value}")
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
context "when the request contains a body" do
|
36
|
+
|
37
|
+
def configure_stub_registrator
|
38
|
+
stub_registrator.with_request_body
|
39
|
+
end
|
40
|
+
|
41
|
+
it "returns a response body that contains the body" do
|
42
|
+
expect(response.body).to include("#{escape_html(stub_registrator.request_body)}")
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module HttpStub
|
2
|
+
module Server
|
3
|
+
module Stub
|
4
|
+
module Match
|
5
|
+
|
6
|
+
class MatchFixture
|
7
|
+
|
8
|
+
def self.create
|
9
|
+
HttpStub::Server::Stub::Match::Match.new(
|
10
|
+
HttpStub::Server::RequestFixture.create,
|
11
|
+
HttpStub::Server::Response::OK,
|
12
|
+
HttpStub::Server::Stub::Stub.new(HttpStub::StubFixture.new.server_payload)
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
File without changes
|
@@ -0,0 +1,83 @@
|
|
1
|
+
module HttpStub
|
2
|
+
|
3
|
+
class StubRegistrator
|
4
|
+
|
5
|
+
attr_reader :request_uri, :request_method, :request_headers, :request_parameters, :request_body
|
6
|
+
attr_reader :stub_response_status, :stub_response_headers, :stub_response_body
|
7
|
+
|
8
|
+
def initialize(stub_server)
|
9
|
+
@stub_server = stub_server
|
10
|
+
|
11
|
+
@request_uri = "/some/uri"
|
12
|
+
@request_method = "get"
|
13
|
+
@request_headers =
|
14
|
+
(1..3).reduce({}) { |result, i| result.tap { result["request_header_#{i}"] = "request header value #{i}" } }
|
15
|
+
@request_parameters = nil
|
16
|
+
@request_body = nil
|
17
|
+
|
18
|
+
@stub_response_status = 203
|
19
|
+
@stub_response_headers =
|
20
|
+
(1..3).reduce({}) { |result, i| result.tap { result["response_header_#{i}"] = "response header value #{i}" } }
|
21
|
+
@stub_response_body = "Stub response body"
|
22
|
+
@stub_response_block = lambda do |_request|
|
23
|
+
{ status: @stub_response_status, headers: @stub_response_headers, body: @stub_response_body }
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def with_request_parameters
|
28
|
+
@request_parameters =
|
29
|
+
(1..3).reduce({}) { |result, i| result.tap { result["parameter_#{i}"] = "parameter value #{i}" } }
|
30
|
+
end
|
31
|
+
|
32
|
+
def with_request_body
|
33
|
+
@request_body = "Some <strong>request body</strong>"
|
34
|
+
end
|
35
|
+
|
36
|
+
def with_request_interpolation
|
37
|
+
@stub_response_block = lambda do |request|
|
38
|
+
{
|
39
|
+
status: @stub_response_status,
|
40
|
+
headers: { header_reference: request.headers[:request_header_2],
|
41
|
+
parameter_reference: request.parameters[:parameter_2] },
|
42
|
+
body: "header: #{request.headers[:request_header_3]}, " \
|
43
|
+
"parameter: #{request.parameters[:parameter_3]}"
|
44
|
+
}
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def register_stub
|
49
|
+
@register_stub_response = @stub_server.add_stub!(build_stub)
|
50
|
+
end
|
51
|
+
|
52
|
+
def register_scenario
|
53
|
+
@stub_server.add_scenario_with_one_stub!("Some scenario", build_stub)
|
54
|
+
end
|
55
|
+
|
56
|
+
def stub_uri
|
57
|
+
@register_stub_response.header["location"]
|
58
|
+
end
|
59
|
+
|
60
|
+
def last_match(uri, method)
|
61
|
+
HTTParty.get("#{@stub_server.base_uri}/http_stub/stubs/matches/last", query: { uri: uri, method: method })
|
62
|
+
end
|
63
|
+
|
64
|
+
def issue_matching_request
|
65
|
+
options = { headers: @request_headers }
|
66
|
+
options[:query] = @request_parameters if @request_parameters
|
67
|
+
options[:body] = @request_body if @request_body
|
68
|
+
HTTParty.send(request_method, "#{@stub_server.base_uri}#{@request_uri}", options)
|
69
|
+
end
|
70
|
+
|
71
|
+
private
|
72
|
+
|
73
|
+
def build_stub
|
74
|
+
@stub_server.build_stub do |stub|
|
75
|
+
stub.match_requests(uri: @request_uri, method: @request_method,
|
76
|
+
headers: @request_headers, parameters: @request_parameters, body: @request_body)
|
77
|
+
stub.respond_with(&@stub_response_block)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_stub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.25.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dueckes
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2016-08-
|
15
|
+
date: 2016-08-08 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rake
|
@@ -345,11 +345,13 @@ files:
|
|
345
345
|
- "./lib/http_stub/server/stub.rb"
|
346
346
|
- "./lib/http_stub/server/stub/controller.rb"
|
347
347
|
- "./lib/http_stub/server/stub/empty.rb"
|
348
|
+
- "./lib/http_stub/server/stub/match/controller.rb"
|
348
349
|
- "./lib/http_stub/server/stub/match/exact_value_matcher.rb"
|
349
350
|
- "./lib/http_stub/server/stub/match/hash_matcher.rb"
|
351
|
+
- "./lib/http_stub/server/stub/match/match.rb"
|
352
|
+
- "./lib/http_stub/server/stub/match/miss.rb"
|
350
353
|
- "./lib/http_stub/server/stub/match/omitted_value_matcher.rb"
|
351
354
|
- "./lib/http_stub/server/stub/match/regexp_value_matcher.rb"
|
352
|
-
- "./lib/http_stub/server/stub/match/result.rb"
|
353
355
|
- "./lib/http_stub/server/stub/match/rule/body.rb"
|
354
356
|
- "./lib/http_stub/server/stub/match/rule/headers.rb"
|
355
357
|
- "./lib/http_stub/server/stub/match/rule/json_body.rb"
|
@@ -358,9 +360,12 @@ files:
|
|
358
360
|
- "./lib/http_stub/server/stub/match/rule/simple_body.rb"
|
359
361
|
- "./lib/http_stub/server/stub/match/rule/truthy.rb"
|
360
362
|
- "./lib/http_stub/server/stub/match/rule/uri.rb"
|
363
|
+
- "./lib/http_stub/server/stub/match/rules.rb"
|
361
364
|
- "./lib/http_stub/server/stub/match/string_value_matcher.rb"
|
362
365
|
- "./lib/http_stub/server/stub/parser.rb"
|
363
|
-
- "./lib/http_stub/server/stub/
|
366
|
+
- "./lib/http_stub/server/stub/payload.rb"
|
367
|
+
- "./lib/http_stub/server/stub/payload/base_uri_modifier.rb"
|
368
|
+
- "./lib/http_stub/server/stub/payload/response_body_modifier.rb"
|
364
369
|
- "./lib/http_stub/server/stub/registry.rb"
|
365
370
|
- "./lib/http_stub/server/stub/response.rb"
|
366
371
|
- "./lib/http_stub/server/stub/response/attribute/body.rb"
|
@@ -375,20 +380,21 @@ files:
|
|
375
380
|
- "./lib/http_stub/server/stub/triggers.rb"
|
376
381
|
- "./lib/http_stub/server/views/_activate_scenario.haml"
|
377
382
|
- "./lib/http_stub/server/views/_file_response.haml"
|
378
|
-
- "./lib/http_stub/server/views/_match.haml"
|
379
|
-
- "./lib/http_stub/server/views/_miss.haml"
|
380
383
|
- "./lib/http_stub/server/views/_request.haml"
|
381
384
|
- "./lib/http_stub/server/views/_response.haml"
|
382
385
|
- "./lib/http_stub/server/views/_stub.haml"
|
386
|
+
- "./lib/http_stub/server/views/_stub_match.haml"
|
387
|
+
- "./lib/http_stub/server/views/_stub_miss.haml"
|
383
388
|
- "./lib/http_stub/server/views/_text_response.haml"
|
384
389
|
- "./lib/http_stub/server/views/application.sass"
|
385
390
|
- "./lib/http_stub/server/views/index.haml"
|
386
391
|
- "./lib/http_stub/server/views/layout.haml"
|
387
|
-
- "./lib/http_stub/server/views/match_results.haml"
|
388
392
|
- "./lib/http_stub/server/views/matches.haml"
|
389
393
|
- "./lib/http_stub/server/views/scenario.haml"
|
390
394
|
- "./lib/http_stub/server/views/scenarios.haml"
|
391
395
|
- "./lib/http_stub/server/views/stub.haml"
|
396
|
+
- "./lib/http_stub/server/views/stub_matches.haml"
|
397
|
+
- "./lib/http_stub/server/views/stub_misses.haml"
|
392
398
|
- "./lib/http_stub/server/views/stubs.haml"
|
393
399
|
- "./lib/http_stub/version.rb"
|
394
400
|
- "./spec/acceptance/activator_spec.rb"
|
@@ -401,7 +407,9 @@ files:
|
|
401
407
|
- "./spec/acceptance/server_defaults_spec.rb"
|
402
408
|
- "./spec/acceptance/stub_body_request_matching_spec.rb"
|
403
409
|
- "./spec/acceptance/stub_control_values_spec.rb"
|
404
|
-
- "./spec/acceptance/
|
410
|
+
- "./spec/acceptance/stub_match_last_spec.rb"
|
411
|
+
- "./spec/acceptance/stub_match_list_spec.rb"
|
412
|
+
- "./spec/acceptance/stub_miss_list_spec.rb"
|
405
413
|
- "./spec/acceptance/stub_spec.rb"
|
406
414
|
- "./spec/acceptance/stub_trigger_spec.rb"
|
407
415
|
- "./spec/curl_samples.txt"
|
@@ -445,7 +453,6 @@ files:
|
|
445
453
|
- "./spec/lib/http_stub/server/application/text_formatting_support_spec.rb"
|
446
454
|
- "./spec/lib/http_stub/server/daemon_integration_spec.rb"
|
447
455
|
- "./spec/lib/http_stub/server/daemon_spec.rb"
|
448
|
-
- "./spec/lib/http_stub/server/payload_file_consolidator_spec.rb"
|
449
456
|
- "./spec/lib/http_stub/server/registry_spec.rb"
|
450
457
|
- "./spec/lib/http_stub/server/request/headers_spec.rb"
|
451
458
|
- "./spec/lib/http_stub/server/request/parameters_spec.rb"
|
@@ -461,11 +468,13 @@ files:
|
|
461
468
|
- "./spec/lib/http_stub/server/scenario_spec.rb"
|
462
469
|
- "./spec/lib/http_stub/server/stub/controller_spec.rb"
|
463
470
|
- "./spec/lib/http_stub/server/stub/empty_spec.rb"
|
471
|
+
- "./spec/lib/http_stub/server/stub/match/controller_spec.rb"
|
464
472
|
- "./spec/lib/http_stub/server/stub/match/exact_value_matcher_spec.rb"
|
465
473
|
- "./spec/lib/http_stub/server/stub/match/hash_matcher_spec.rb"
|
474
|
+
- "./spec/lib/http_stub/server/stub/match/match_spec.rb"
|
475
|
+
- "./spec/lib/http_stub/server/stub/match/miss_spec.rb"
|
466
476
|
- "./spec/lib/http_stub/server/stub/match/omitted_value_matcher_spec.rb"
|
467
477
|
- "./spec/lib/http_stub/server/stub/match/regexp_value_matcher_spec.rb"
|
468
|
-
- "./spec/lib/http_stub/server/stub/match/result_spec.rb"
|
469
478
|
- "./spec/lib/http_stub/server/stub/match/rule/body_spec.rb"
|
470
479
|
- "./spec/lib/http_stub/server/stub/match/rule/headers_spec.rb"
|
471
480
|
- "./spec/lib/http_stub/server/stub/match/rule/json_body_spec.rb"
|
@@ -474,8 +483,12 @@ files:
|
|
474
483
|
- "./spec/lib/http_stub/server/stub/match/rule/simple_body_spec.rb"
|
475
484
|
- "./spec/lib/http_stub/server/stub/match/rule/truthy_spec.rb"
|
476
485
|
- "./spec/lib/http_stub/server/stub/match/rule/uri_spec.rb"
|
486
|
+
- "./spec/lib/http_stub/server/stub/match/rules_spec.rb"
|
477
487
|
- "./spec/lib/http_stub/server/stub/match/string_value_matcher_spec.rb"
|
478
488
|
- "./spec/lib/http_stub/server/stub/parser_spec.rb"
|
489
|
+
- "./spec/lib/http_stub/server/stub/payload/base_uri_modifier_spec.rb"
|
490
|
+
- "./spec/lib/http_stub/server/stub/payload/response_body_modifier_spec.rb"
|
491
|
+
- "./spec/lib/http_stub/server/stub/payload_spec.rb"
|
479
492
|
- "./spec/lib/http_stub/server/stub/registry_integration_spec.rb"
|
480
493
|
- "./spec/lib/http_stub/server/stub/registry_spec.rb"
|
481
494
|
- "./spec/lib/http_stub/server/stub/response/attribute/body_spec.rb"
|
@@ -494,19 +507,23 @@ files:
|
|
494
507
|
- "./spec/resources/sample.txt"
|
495
508
|
- "./spec/spec_helper.rb"
|
496
509
|
- "./spec/support/browser_integration.rb"
|
497
|
-
- "./spec/support/configurer_integration.rb"
|
498
510
|
- "./spec/support/cross_origin_server/application.rb"
|
499
511
|
- "./spec/support/cross_origin_server/index_page.rb"
|
500
512
|
- "./spec/support/cross_origin_server/integration.rb"
|
501
513
|
- "./spec/support/cross_origin_server/public/index.html"
|
502
514
|
- "./spec/support/html_helpers.rb"
|
515
|
+
- "./spec/support/http_stub/configurer_integration.rb"
|
503
516
|
- "./spec/support/http_stub/empty_configurer.rb"
|
517
|
+
- "./spec/support/http_stub/html_view_excluding_request_details.rb"
|
518
|
+
- "./spec/support/http_stub/html_view_including_request_details.rb"
|
504
519
|
- "./spec/support/http_stub/scenario_fixture.rb"
|
505
520
|
- "./spec/support/http_stub/server/request_fixture.rb"
|
506
521
|
- "./spec/support/http_stub/server/scenario/scenario_fixture.rb"
|
507
|
-
- "./spec/support/http_stub/server/stub/match/
|
522
|
+
- "./spec/support/http_stub/server/stub/match/match_fixture.rb"
|
523
|
+
- "./spec/support/http_stub/server/stub/match/miss_fixture.rb"
|
524
|
+
- "./spec/support/http_stub/server_integration.rb"
|
508
525
|
- "./spec/support/http_stub/stub_fixture.rb"
|
509
|
-
- "./spec/support/
|
526
|
+
- "./spec/support/http_stub/stub_registrator.rb"
|
510
527
|
homepage: http://github.com/MYOB-Technology/http_stub
|
511
528
|
licenses:
|
512
529
|
- MIT
|
@@ -542,7 +559,9 @@ test_files:
|
|
542
559
|
- "./spec/acceptance/server_defaults_spec.rb"
|
543
560
|
- "./spec/acceptance/stub_body_request_matching_spec.rb"
|
544
561
|
- "./spec/acceptance/stub_control_values_spec.rb"
|
545
|
-
- "./spec/acceptance/
|
562
|
+
- "./spec/acceptance/stub_match_last_spec.rb"
|
563
|
+
- "./spec/acceptance/stub_match_list_spec.rb"
|
564
|
+
- "./spec/acceptance/stub_miss_list_spec.rb"
|
546
565
|
- "./spec/acceptance/stub_spec.rb"
|
547
566
|
- "./spec/acceptance/stub_trigger_spec.rb"
|
548
567
|
- "./spec/curl_samples.txt"
|
@@ -586,7 +605,6 @@ test_files:
|
|
586
605
|
- "./spec/lib/http_stub/server/application/text_formatting_support_spec.rb"
|
587
606
|
- "./spec/lib/http_stub/server/daemon_integration_spec.rb"
|
588
607
|
- "./spec/lib/http_stub/server/daemon_spec.rb"
|
589
|
-
- "./spec/lib/http_stub/server/payload_file_consolidator_spec.rb"
|
590
608
|
- "./spec/lib/http_stub/server/registry_spec.rb"
|
591
609
|
- "./spec/lib/http_stub/server/request/headers_spec.rb"
|
592
610
|
- "./spec/lib/http_stub/server/request/parameters_spec.rb"
|
@@ -602,11 +620,13 @@ test_files:
|
|
602
620
|
- "./spec/lib/http_stub/server/scenario_spec.rb"
|
603
621
|
- "./spec/lib/http_stub/server/stub/controller_spec.rb"
|
604
622
|
- "./spec/lib/http_stub/server/stub/empty_spec.rb"
|
623
|
+
- "./spec/lib/http_stub/server/stub/match/controller_spec.rb"
|
605
624
|
- "./spec/lib/http_stub/server/stub/match/exact_value_matcher_spec.rb"
|
606
625
|
- "./spec/lib/http_stub/server/stub/match/hash_matcher_spec.rb"
|
626
|
+
- "./spec/lib/http_stub/server/stub/match/match_spec.rb"
|
627
|
+
- "./spec/lib/http_stub/server/stub/match/miss_spec.rb"
|
607
628
|
- "./spec/lib/http_stub/server/stub/match/omitted_value_matcher_spec.rb"
|
608
629
|
- "./spec/lib/http_stub/server/stub/match/regexp_value_matcher_spec.rb"
|
609
|
-
- "./spec/lib/http_stub/server/stub/match/result_spec.rb"
|
610
630
|
- "./spec/lib/http_stub/server/stub/match/rule/body_spec.rb"
|
611
631
|
- "./spec/lib/http_stub/server/stub/match/rule/headers_spec.rb"
|
612
632
|
- "./spec/lib/http_stub/server/stub/match/rule/json_body_spec.rb"
|
@@ -615,8 +635,12 @@ test_files:
|
|
615
635
|
- "./spec/lib/http_stub/server/stub/match/rule/simple_body_spec.rb"
|
616
636
|
- "./spec/lib/http_stub/server/stub/match/rule/truthy_spec.rb"
|
617
637
|
- "./spec/lib/http_stub/server/stub/match/rule/uri_spec.rb"
|
638
|
+
- "./spec/lib/http_stub/server/stub/match/rules_spec.rb"
|
618
639
|
- "./spec/lib/http_stub/server/stub/match/string_value_matcher_spec.rb"
|
619
640
|
- "./spec/lib/http_stub/server/stub/parser_spec.rb"
|
641
|
+
- "./spec/lib/http_stub/server/stub/payload/base_uri_modifier_spec.rb"
|
642
|
+
- "./spec/lib/http_stub/server/stub/payload/response_body_modifier_spec.rb"
|
643
|
+
- "./spec/lib/http_stub/server/stub/payload_spec.rb"
|
620
644
|
- "./spec/lib/http_stub/server/stub/registry_integration_spec.rb"
|
621
645
|
- "./spec/lib/http_stub/server/stub/registry_spec.rb"
|
622
646
|
- "./spec/lib/http_stub/server/stub/response/attribute/body_spec.rb"
|
@@ -635,16 +659,20 @@ test_files:
|
|
635
659
|
- "./spec/resources/sample.txt"
|
636
660
|
- "./spec/spec_helper.rb"
|
637
661
|
- "./spec/support/browser_integration.rb"
|
638
|
-
- "./spec/support/configurer_integration.rb"
|
639
662
|
- "./spec/support/cross_origin_server/application.rb"
|
640
663
|
- "./spec/support/cross_origin_server/index_page.rb"
|
641
664
|
- "./spec/support/cross_origin_server/integration.rb"
|
642
665
|
- "./spec/support/cross_origin_server/public/index.html"
|
643
666
|
- "./spec/support/html_helpers.rb"
|
667
|
+
- "./spec/support/http_stub/configurer_integration.rb"
|
644
668
|
- "./spec/support/http_stub/empty_configurer.rb"
|
669
|
+
- "./spec/support/http_stub/html_view_excluding_request_details.rb"
|
670
|
+
- "./spec/support/http_stub/html_view_including_request_details.rb"
|
645
671
|
- "./spec/support/http_stub/scenario_fixture.rb"
|
646
672
|
- "./spec/support/http_stub/server/request_fixture.rb"
|
647
673
|
- "./spec/support/http_stub/server/scenario/scenario_fixture.rb"
|
648
|
-
- "./spec/support/http_stub/server/stub/match/
|
674
|
+
- "./spec/support/http_stub/server/stub/match/match_fixture.rb"
|
675
|
+
- "./spec/support/http_stub/server/stub/match/miss_fixture.rb"
|
676
|
+
- "./spec/support/http_stub/server_integration.rb"
|
649
677
|
- "./spec/support/http_stub/stub_fixture.rb"
|
650
|
-
- "./spec/support/
|
678
|
+
- "./spec/support/http_stub/stub_registrator.rb"
|