restful-matchers 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21f1e56c6b101a636fddd9f272937c24697761e2
|
4
|
+
data.tar.gz: d32552d0585012538ebdbc5b603b5497101cf74f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fc96e15be1592788c93b35888812c4a641397c9d27ff53610da4eecf20681f5a5ff359e8aad0761acfc4b15cc8ea4175513aee94dd6ff7a10c8a547b732b1d9
|
7
|
+
data.tar.gz: 72b143e12bd82f3f5283719103b075d28311115c9743f0774627d37d5ffb8c7350c97fca0fe71c6f61c2511939e50aeaf93cdb97b767aa04097f54740a9c0b56
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
restful-matchers (0.3.
|
4
|
+
restful-matchers (0.3.1)
|
5
5
|
rspec (~> 2.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -22,7 +22,7 @@ GEM
|
|
22
22
|
rspec-expectations (~> 2.14.0)
|
23
23
|
rspec-mocks (~> 2.14.0)
|
24
24
|
rspec-core (2.14.5)
|
25
|
-
rspec-expectations (2.14.
|
25
|
+
rspec-expectations (2.14.3)
|
26
26
|
diff-lcs (>= 1.1.3, < 2.0)
|
27
27
|
rspec-mocks (2.14.3)
|
28
28
|
slop (3.4.6)
|
@@ -13,10 +13,11 @@ module RESTful
|
|
13
13
|
HaveLink.new(rel, href)
|
14
14
|
end
|
15
15
|
alias_method :have_restful_json_link, :have_link
|
16
|
+
alias_method :have_restful_link, :have_link
|
16
17
|
|
17
18
|
class HaveLink
|
18
19
|
def initialize(rel, href = nil)
|
19
|
-
@rel = rel
|
20
|
+
@rel = rel.to_s
|
20
21
|
@href = href
|
21
22
|
end
|
22
23
|
|
@@ -6,6 +6,8 @@ describe RESTful::Matchers::HaveLink do
|
|
6
6
|
|
7
7
|
it "should match a valid link" do
|
8
8
|
@content.should have_link("self", "http://example.com")
|
9
|
+
@content.should have_restful_link("self", "http://example.com")
|
10
|
+
@content.should have_restful_json_link("self", "http://example.com")
|
9
11
|
end
|
10
12
|
|
11
13
|
it "should not match a non-existing link" do
|
@@ -6,11 +6,13 @@ describe RESTful::Matchers::HaveLinks do
|
|
6
6
|
let(:content) { open("spec/fixtures/json/resource_with_links.json").read }
|
7
7
|
|
8
8
|
it "should match an array of links using symbols as keys" do
|
9
|
-
|
9
|
+
expected_links = [
|
10
10
|
{ rel: "self", href: "http://example.com" },
|
11
11
|
{ rel: "foo" , href: "http://example.com/foo" },
|
12
12
|
{ rel: "bar" , href: "http://example.com/bar" }
|
13
|
-
]
|
13
|
+
]
|
14
|
+
content.should have_links(expected_links)
|
15
|
+
content.should have_restful_links(expected_links)
|
14
16
|
end
|
15
17
|
|
16
18
|
it "should match an array of links using string as keys" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restful-matchers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcos Hack
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
93
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.0.
|
94
|
+
rubygems_version: 2.0.3
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: RSpec matchers to test RESTful HATEOAS-compliant resource links.
|