http_stub 0.9.2 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,6 +25,10 @@ module HttpStub
25
25
  @port = port
26
26
  end
27
27
 
28
+ def get_base_uri
29
+ "http://#{@host}:#{@port}"
30
+ end
31
+
28
32
  def stub_activator(activation_uri, stub_uri, options)
29
33
  request = HttpStub::Configurer::Request::StubActivator.new(activation_uri, stub_uri, options)
30
34
  handle(request: request, description: "registering activator '#{activation_uri}'")
@@ -1,3 +1,3 @@
1
1
  module HttpStub
2
- VERSION = "0.9.2"
2
+ VERSION = "0.9.3"
3
3
  end
@@ -0,0 +1,22 @@
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 "should return a uri that combines the provided host and port" do
13
+ TestableConfigurer.get_base_uri.should include("some_host:8888")
14
+ end
15
+
16
+ it "should return a uri accessed via http" do
17
+ TestableConfigurer.get_base_uri.should match(/^http:\/\//)
18
+ end
19
+
20
+ end
21
+
22
+ 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.9.2
4
+ version: 0.9.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-10-03 00:00:00.000000000 Z
13
+ date: 2013-10-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sinatra
@@ -283,6 +283,7 @@ files:
283
283
  - ./spec/lib/http_stub/configurer/request/stub_activator_spec.rb
284
284
  - ./spec/lib/http_stub/configurer/request/stub_spec.rb
285
285
  - ./spec/lib/http_stub/configurer_integration_spec.rb
286
+ - ./spec/lib/http_stub/configurer_spec.rb
286
287
  - ./spec/lib/http_stub/controllers/stub_activator_controller_spec.rb
287
288
  - ./spec/lib/http_stub/controllers/stub_controller_spec.rb
288
289
  - ./spec/lib/http_stub/hash_extensions_spec.rb
@@ -324,7 +325,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
324
325
  version: '0'
325
326
  segments:
326
327
  - 0
327
- hash: 3783523882870013849
328
+ hash: -207127698310422263
328
329
  requirements: []
329
330
  rubyforge_project: http_stub
330
331
  rubygems_version: 1.8.25
@@ -341,6 +342,7 @@ test_files:
341
342
  - ./spec/lib/http_stub/configurer/request/stub_activator_spec.rb
342
343
  - ./spec/lib/http_stub/configurer/request/stub_spec.rb
343
344
  - ./spec/lib/http_stub/configurer_integration_spec.rb
345
+ - ./spec/lib/http_stub/configurer_spec.rb
344
346
  - ./spec/lib/http_stub/controllers/stub_activator_controller_spec.rb
345
347
  - ./spec/lib/http_stub/controllers/stub_controller_spec.rb
346
348
  - ./spec/lib/http_stub/hash_extensions_spec.rb