http_stub 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,7 @@ module HttpStub
14
14
  def stubs?(request)
15
15
  @data["uri"] == request.path_info &&
16
16
  @data["method"].downcase == request.request_method.downcase &&
17
- parameters == request.params
17
+ (parameters.empty? || (parameters == request.params))
18
18
  end
19
19
 
20
20
  def to_s
@@ -1,3 +1,3 @@
1
1
  module HttpStub
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -81,6 +81,22 @@ describe HttpStub::Stub do
81
81
 
82
82
  end
83
83
 
84
+ describe "and a parameter match is not configured" do
85
+
86
+ describe "and parameters are provided in the request" do
87
+
88
+ let(:request_parameters) do
89
+ { "param1" => "value1" }
90
+ end
91
+
92
+ it "should be true" do
93
+ stub_instance.stubs?(request).should be_true
94
+ end
95
+
96
+ end
97
+
98
+ end
99
+
84
100
  end
85
101
 
86
102
  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.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -183,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  version: '0'
184
184
  segments:
185
185
  - 0
186
- hash: -2002962712402429402
186
+ hash: 1080300762408151484
187
187
  requirements: []
188
188
  rubyforge_project: http_stub
189
189
  rubygems_version: 1.8.25