|
28 | 28 | context "building the key" do
|
29 | 29 | it "builds the key" do
|
30 | 30 | key = subject.send(:key, "foo.html", "foo" => "bar", "foo2" => "bar2")
|
| 31 | + params = { "foo" => "bar", "foo2" => "bar2" } |
31 | 32 | expect(key).to eql(
|
32 |
| - subject.send(:digest, "foo.html".hash, subject.send(:quick_hash, { "foo" => "bar", "foo2" => "bar2" })) |
| 33 | + subject.send(:digest, "foo.html".hash, subject.send(:quick_hash, params)) |
33 | 34 | )
|
34 | 35 | end
|
35 | 36 |
|
36 | 37 | it "builds the key based on the path" do
|
37 | 38 | key = subject.send(:key, "foo2.html", "foo" => "bar", "foo2" => "bar2")
|
| 39 | + params = { "foo" => "bar", "foo2" => "bar2" } |
38 | 40 | expect(key).to eql(
|
39 |
| - subject.send(:digest, "foo2.html".hash, subject.send(:quick_hash, { "foo" => "bar", "foo2" => "bar2" })) |
| 41 | + subject.send(:digest, "foo2.html".hash, subject.send(:quick_hash, params)) |
40 | 42 | )
|
41 | 43 | end
|
42 | 44 |
|
43 | 45 | it "builds the key based on the params" do
|
44 | 46 | key = subject.send(:key, "foo2.html", "foo" => "bar")
|
45 |
| - expect(key).to eql(subject.send(:digest, "foo2.html".hash, subject.send(:quick_hash, { "foo" => "bar" }))) |
| 47 | + params = { "foo" => "bar" } |
| 48 | + expect(key).to eql(subject.send(:digest, "foo2.html".hash, subject.send(:quick_hash, params))) |
46 | 49 | end
|
47 | 50 | end
|
48 | 51 |
|
|
0 commit comments