http_stub 0.16.0.pre1 → 0.17.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/lib/http_stub.rb +10 -5
- data/lib/http_stub/configurer.rb +1 -21
- data/lib/http_stub/configurer/dsl/{sanctioned.rb → server.rb} +7 -1
- data/lib/http_stub/configurer/dsl/stub_builder.rb +4 -0
- data/lib/http_stub/configurer/request/stub.rb +1 -0
- data/lib/http_stub/configurer/server/command_processor.rb +3 -3
- data/lib/http_stub/rake/server_tasks.rb +1 -1
- data/lib/http_stub/server/daemon.rb +3 -1
- data/lib/http_stub/server/stub/instance.rb +3 -2
- data/lib/http_stub/server/stub/json_request_body.rb +35 -0
- data/lib/http_stub/server/stub/request_body.rb +44 -0
- data/lib/http_stub/server/stub/simple_request_body.rb +23 -0
- data/lib/http_stub/server/stub/truthy_request_matcher.rb +23 -0
- data/lib/http_stub/server/views/_stub.haml +3 -0
- data/lib/http_stub/version.rb +1 -1
- data/spec/acceptance/configurer_initialization_spec.rb +1 -1
- data/spec/acceptance/stub_body_schema_validation_spec.rb +67 -0
- data/spec/acceptance/stub_control_values_spec.rb +2 -2
- data/spec/acceptance/stub_spec.rb +1 -1
- data/spec/lib/http_stub/configurer/dsl/{sanctioned_spec.rb → server_spec.rb} +34 -15
- data/spec/lib/http_stub/configurer/dsl/stub_builder_spec.rb +18 -0
- data/spec/lib/http_stub/configurer/request/stub_spec.rb +52 -20
- data/spec/lib/http_stub/configurer/server/command_processor_integration_spec.rb +7 -4
- data/spec/lib/http_stub/rake/server_tasks_smoke_spec.rb +54 -13
- data/spec/lib/http_stub/server/application_integration_spec.rb +22 -2
- data/spec/lib/http_stub/server/daemon_integration_spec.rb +1 -1
- data/spec/lib/http_stub/server/daemon_spec.rb +50 -2
- data/spec/lib/http_stub/server/stub/instance_spec.rb +44 -10
- data/spec/lib/http_stub/server/stub/json_request_body_spec.rb +102 -0
- data/spec/lib/http_stub/server/stub/request_body_spec.rb +120 -0
- data/spec/lib/http_stub/server/stub/simple_request_body_spec.rb +43 -0
- data/spec/lib/http_stub/server/stub/string_value_matcher_spec.rb +2 -2
- data/spec/lib/http_stub/server/stub/truthy_request_matcher_spec.rb +23 -0
- data/spec/lib/http_stub/server/stub/uri_spec.rb +1 -1
- data/spec/spec_helper.rb +3 -2
- data/spec/support/configurer_integration.rb +2 -2
- data/spec/support/stub_fixture.rb +2 -1
- metadata +307 -281
- data/spec/lib/http_stub/configurer_spec.rb +0 -22
@@ -1,22 +0,0 @@
|
|
1
|
-
describe HttpStub::Configurer do
|
2
|
-
|
3
|
-
class TestableConfigurer
|
4
|
-
include HttpStub::Configurer
|
5
|
-
|
6
|
-
host "some_host"
|
7
|
-
port "8888"
|
8
|
-
end
|
9
|
-
|
10
|
-
describe "::get_base_uri" do
|
11
|
-
|
12
|
-
it "returns a uri that combines the provided host and port" do
|
13
|
-
expect(TestableConfigurer.get_base_uri).to include("some_host:8888")
|
14
|
-
end
|
15
|
-
|
16
|
-
it "returns a uri accessed via http" do
|
17
|
-
expect(TestableConfigurer.get_base_uri).to match(/^http:\/\//)
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|