grape-entity-matchers 0.4.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -4
- data/Guardfile +1 -1
- data/README.markdown +3 -3
- data/grape-entity-matchers.gemspec +1 -1
- data/lib/grape_entity_matchers/represent_matcher.rb +2 -2
- data/lib/grape_entity_matchers/version.rb +1 -1
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 201e83f92394d4a476dbf384884eb5dc8cdc0b50
|
4
|
+
data.tar.gz: 8136e5e27b4b231d2ee8e734225c3ac43cc1e39d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c9497164c4e20a6af1c37c6e448eec8d7b843a34928fb5c3e035df400ecbca1dd98306061e7a6bf55046965a7162c853de2df6d11d71cc7d7ab65c85d2320c5
|
7
|
+
data.tar.gz: 277cd43f7d4e174c877915022831adad4b0479e59c054e0405f7a55983655e2e18d3966a962dc7a9dd60bb4bdd4e74230903ab72330b58d41870d3d3021527a0
|
data/.travis.yml
CHANGED
data/Guardfile
CHANGED
@@ -6,7 +6,7 @@ guard 'bundler' do
|
|
6
6
|
# watch(/^.+\.gemspec/)
|
7
7
|
end
|
8
8
|
|
9
|
-
guard :rspec, cmd: 'bundle exec rspec' do
|
9
|
+
guard :rspec, cmd: 'bundle exec rspec --color --fail-fast --format=progress' do
|
10
10
|
watch(%r{^spec/.+_spec\.rb$})
|
11
11
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
12
12
|
watch(%r{^spec/support/shared_versioning_examples.rb$}) { |m| "spec/" }
|
data/README.markdown
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
This gem provides shoulda-style matchers for Rspec to [GrapeEntity](https://github.com/agileanimal/grape-entity).
|
8
8
|
|
9
|
-
Currently compatible
|
9
|
+
Currently compatible Rspec 3.
|
10
10
|
|
11
11
|
## Using the Matchers
|
12
12
|
|
@@ -27,9 +27,9 @@ it { should represent(:dog).using(PetEntity) }
|
|
27
27
|
it { should represent(:cat).as(:kitty).using(PetEntity) }
|
28
28
|
```
|
29
29
|
|
30
|
-
## Support Rspec
|
30
|
+
## Support Rspec 2.0.0
|
31
31
|
|
32
|
-
Rspec
|
32
|
+
Rspec 2.0.0 is no longer support in future releases. For Rspec 2 use version 0.4.0.
|
33
33
|
|
34
34
|
## Minitest
|
35
35
|
|
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.rubyforge_project = "grape-entity-matchers"
|
16
16
|
|
17
17
|
s.add_runtime_dependency 'grape-entity', '~> 0.4.0'
|
18
|
-
s.add_runtime_dependency 'rspec', '
|
18
|
+
s.add_runtime_dependency 'rspec', '>= 3.0.0.beta'
|
19
19
|
|
20
20
|
|
21
21
|
s.add_development_dependency 'rake'
|
@@ -10,7 +10,7 @@ module GrapeEntityMatchers
|
|
10
10
|
class RepresentMatcher
|
11
11
|
def initialize(representable)
|
12
12
|
@expected_representable = representable
|
13
|
-
RSpec::Mocks::setup
|
13
|
+
RSpec::Mocks::setup
|
14
14
|
end
|
15
15
|
|
16
16
|
def matches?(subject)
|
@@ -87,7 +87,7 @@ module GrapeEntityMatchers
|
|
87
87
|
@representee = double("RepresetedObject")
|
88
88
|
@represented_attribute ||= :value
|
89
89
|
|
90
|
-
|
90
|
+
allow(@representee).to receive(@expected_representable).and_return(@represented_attribute)
|
91
91
|
expect(@representee).to receive(@conditions.keys.first).and_return(@conditions.values.first) unless @conditions.nil?
|
92
92
|
|
93
93
|
representation = @subject.represent(@representee)
|
metadata
CHANGED
@@ -1,97 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-entity-matchers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Madsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grape-entity
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.4.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.4.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 3.0.0.beta
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 3.0.0.beta
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: maruku
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: yard
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: bundler
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
description: Shoulda-like matchers for Grape Entity.
|
@@ -101,10 +101,10 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
-
- .gitignore
|
105
|
-
- .rspec
|
106
|
-
- .travis.yml
|
107
|
-
- .yardopts
|
104
|
+
- ".gitignore"
|
105
|
+
- ".rspec"
|
106
|
+
- ".travis.yml"
|
107
|
+
- ".yardopts"
|
108
108
|
- CHANGELOG.markdown
|
109
109
|
- Gemfile
|
110
110
|
- Guardfile
|
@@ -129,17 +129,17 @@ require_paths:
|
|
129
129
|
- lib
|
130
130
|
required_ruby_version: !ruby/object:Gem::Requirement
|
131
131
|
requirements:
|
132
|
-
- -
|
132
|
+
- - ">="
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '0'
|
135
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- -
|
137
|
+
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
141
|
rubyforge_project: grape-entity-matchers
|
142
|
-
rubygems_version: 2.
|
142
|
+
rubygems_version: 2.2.2
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Shoulda-like matchers for Grape Entity.
|