rspec-virtus 0.1.1 → 0.2.0
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.
- checksums.yaml +8 -8
- data/.ruby-version +1 -1
- data/.travis.yml +3 -1
- data/README.md +5 -0
- data/lib/rspec-virtus/version.rb +1 -1
- data/rspec-virtus.gemspec +1 -1
- data/spec/lib/rspec-virtus/matcher_spec.rb +6 -18
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Njk5ZjMyYzY2MzgwMjkzMjAyNmI1OTFjYjE4ZGEyZWY4ZDA4OTJiNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDEzZWRlMmQxNTlhNzNhZGRhMjNiODc0YzViOTk4MjQ0ZjY4ZmVlYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWY1MDVlOWNmOWVmYzIwOTFkYjBjYTY1MDVmMTIyODgzMDYwY2UwMTFjODYy
|
10
|
+
MjQwNjc4NTA1ZDc4OTQxNmYwNjcxZDE1NGFkZmNmNjZmNjhlMGRkN2ZlMjdj
|
11
|
+
NmViNGE5OTk0YWVjNGQ0OTM0ZGVkMDUwOTY4MTI1ODg2ODk0YjY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Nzg0OGUxNTlmNWFiNGNmZmFiNzdjY2I0OTE3Nzk4ZWRjNzhjMzAxMzM4ZWI3
|
14
|
+
NTc3Y2EwODQ3NzQ2N2U4NjRlZmVlZWE2ZGI4ZmM4ZGNiOTg3MjBjOTc2YTIy
|
15
|
+
Zjc5NDU3N2ZhNWYxMDk5ZjMxMjgwYTk0NDUzOTc4MWViYjE1ZDY=
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
2.1.2
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -54,3 +54,8 @@ And with `rspec-virtus` we can now make simple assertions about these models
|
|
54
54
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
55
55
|
4. Push to the branch (`git push origin my-new-feature`)
|
56
56
|
5. Create new Pull Request
|
57
|
+
|
58
|
+
## Changelog
|
59
|
+
|
60
|
+
- Version 0.2.0
|
61
|
+
- Upgrade to RSpec 3.0
|
data/lib/rspec-virtus/version.rb
CHANGED
data/rspec-virtus.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
|
-
gem.add_dependency "rspec", ">=
|
20
|
+
gem.add_dependency "rspec", ">= 3.0"
|
21
21
|
gem.add_dependency "virtus", "~> 0.5"
|
22
22
|
|
23
23
|
gem.add_development_dependency "rake", "~> 10.0.0"
|
@@ -17,9 +17,7 @@ describe RSpec::Virtus::Matcher do
|
|
17
17
|
let(:actual) { DummyVirtus }
|
18
18
|
|
19
19
|
context 'successful match on attribute name' do
|
20
|
-
it
|
21
|
-
expect(subject).to eql(true)
|
22
|
-
end
|
20
|
+
it { is_expected.to eql(true) }
|
23
21
|
end
|
24
22
|
|
25
23
|
context 'successful match on attribute name and type' do
|
@@ -27,9 +25,7 @@ describe RSpec::Virtus::Matcher do
|
|
27
25
|
instance.of_type(String)
|
28
26
|
end
|
29
27
|
|
30
|
-
it
|
31
|
-
expect(subject).to eql(true)
|
32
|
-
end
|
28
|
+
it { is_expected.to eql(true) }
|
33
29
|
end
|
34
30
|
|
35
31
|
context 'successful match on attribute name, type and member_type' do
|
@@ -39,17 +35,13 @@ describe RSpec::Virtus::Matcher do
|
|
39
35
|
instance.of_type(Array, member_type: String)
|
40
36
|
end
|
41
37
|
|
42
|
-
it
|
43
|
-
expect(subject).to eql(true)
|
44
|
-
end
|
38
|
+
it { is_expected.to eql(true) }
|
45
39
|
end
|
46
40
|
|
47
41
|
context 'unsuccessful match on attribute name' do
|
48
42
|
let(:attribute_name) { :something_else }
|
49
43
|
|
50
|
-
it
|
51
|
-
expect(subject).to eql(false)
|
52
|
-
end
|
44
|
+
it { is_expected.to eql(false) }
|
53
45
|
end
|
54
46
|
|
55
47
|
context 'unsuccessful match on attribute name and type' do
|
@@ -59,9 +51,7 @@ describe RSpec::Virtus::Matcher do
|
|
59
51
|
instance.of_type(Integer)
|
60
52
|
end
|
61
53
|
|
62
|
-
it
|
63
|
-
expect(subject).to eql(false)
|
64
|
-
end
|
54
|
+
it { is_expected.to eql(false) }
|
65
55
|
end
|
66
56
|
|
67
57
|
context 'unsuccessful match on attribute name, type and member_type' do
|
@@ -71,9 +61,7 @@ describe RSpec::Virtus::Matcher do
|
|
71
61
|
instance.of_type(Array, member_type: Integer)
|
72
62
|
end
|
73
63
|
|
74
|
-
it
|
75
|
-
expect(subject).to eql(false)
|
76
|
-
end
|
64
|
+
it { is_expected.to eql(false) }
|
77
65
|
end
|
78
66
|
end
|
79
67
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-virtus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '3.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
|
-
version: '
|
26
|
+
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: virtus
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|