sucker 0.6.3 → 0.6.4
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.
- data/lib/sucker/stub.rb +1 -1
- data/spec/unit/sucker/stub_spec.rb +8 -2
- metadata +3 -3
data/lib/sucker/stub.rb
CHANGED
@@ -14,7 +14,7 @@ module Sucker
|
|
14
14
|
def stub(request)
|
15
15
|
request.instance_eval do
|
16
16
|
self.class.send :define_method, :fixture do
|
17
|
-
filename = Digest::MD5.hexdigest(
|
17
|
+
filename = Digest::MD5.hexdigest(host + parameters.values.flatten.join)
|
18
18
|
"#{Sucker.fixtures_path}/#{filename}.xml"
|
19
19
|
end
|
20
20
|
|
@@ -47,9 +47,15 @@ module Sucker
|
|
47
47
|
end
|
48
48
|
|
49
49
|
it "generates unique fixtures across venues" do
|
50
|
-
|
50
|
+
first_fixture = @worker.fixture
|
51
51
|
@worker.locale = "fr"
|
52
|
-
@worker.fixture.should_not eql
|
52
|
+
@worker.fixture.should_not eql first_fixture
|
53
|
+
end
|
54
|
+
|
55
|
+
it "reuses fixture regardless of signature" do
|
56
|
+
first_fixture = @worker.fixture
|
57
|
+
@worker.stub!(:timestamp).and_return({ "Timestamp" => "foo" })
|
58
|
+
@worker.fixture.should eql first_fixture
|
53
59
|
end
|
54
60
|
end
|
55
61
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sucker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 4
|
10
|
+
version: 0.6.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Hakan Ensari
|