mongoid-rspec 1.11.0 → 1.13.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 +6 -11
- data/README.md +5 -3
- data/lib/matchers/accept_nested_attributes.rb +2 -0
- data/lib/matchers/allow_mass_assignment.rb +1 -0
- data/lib/matchers/associations.rb +3 -0
- data/lib/matchers/document.rb +3 -0
- data/lib/matchers/indexes.rb +3 -0
- data/lib/matchers/validations.rb +3 -0
- data/lib/mongoid-rspec/version.rb +1 -1
- data/mongoid-rspec.gemspec +2 -2
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a4c1a2239f0fe2d5fa2e91f8c33d3e481700810
|
4
|
+
data.tar.gz: 8c6e6f83f5a1d01d5ee9820fb56e76913f568dbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51b893ad1bf9837b1c7e5183cd4033be0397953b90169852cdad26a26388b60e193d834bc035eb274ef4c6434a02c4f2c75e8eee72534fb88cc53b035465edc2
|
7
|
+
data.tar.gz: 8d35fbfdb8b35e44050330f06fa00e98cb3670a1fe444159d12e182f1f50efdc11616de71d0685dc49d6a128104964ed9c08d08d8e71a2a0653c641e1ded6c97
|
data/.travis.yml
CHANGED
@@ -1,17 +1,12 @@
|
|
1
|
+
services: mongodb
|
1
2
|
language: ruby
|
2
3
|
rvm:
|
3
4
|
- 1.9.3
|
4
5
|
- 2.0.0
|
5
6
|
- 2.1.0
|
6
|
-
-
|
7
|
-
-
|
7
|
+
- 2.1.2
|
8
|
+
- 2.1.3
|
9
|
+
- 2.2.0
|
8
10
|
- jruby-19mode
|
9
|
-
|
10
|
-
-
|
11
|
-
- rbx-head
|
12
|
-
- ree
|
13
|
-
matrix:
|
14
|
-
allow_failures:
|
15
|
-
- rvm: ruby-head
|
16
|
-
- rvm: jruby-head
|
17
|
-
- rvm: rbx-head
|
11
|
+
gemfile:
|
12
|
+
- Gemfile
|
data/README.md
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
mongoid-rspec
|
2
2
|
=
|
3
3
|
|
4
|
-
[![Build Status]
|
5
|
-
|
6
|
-
http://rubygems.org/gems/mongoid-rspec
|
4
|
+
[![Build Status][travis_badge]][travis]
|
7
5
|
|
8
6
|
RSpec matchers for Mongoid 3.x.
|
9
7
|
|
@@ -203,3 +201,7 @@ Acknowledgement
|
|
203
201
|
Thanks to [Durran Jordan](https://github.com/durran) for providing the changes necessary to make
|
204
202
|
this compatible with mongoid 2.0.0.rc, and for other [contributors](https://github.com/evansagge/mongoid-rspec/contributors)
|
205
203
|
to this project.
|
204
|
+
|
205
|
+
|
206
|
+
[travis_badge]: https://travis-ci.org/mongoid-rspec/mongoid-rspec.svg?branch=mongoid-3-1
|
207
|
+
[travis]: https://travis-ci.org/mongoid-rspec/mongoid-rspec
|
@@ -246,6 +246,9 @@ module Mongoid
|
|
246
246
|
"Expected #{@actual.inspect} to not #{@expectation_message}, got #{@positive_result_message}"
|
247
247
|
end
|
248
248
|
|
249
|
+
alias :failure_message :failure_message_for_should
|
250
|
+
alias :failure_message_when_negated :failure_message_for_should_not
|
251
|
+
|
249
252
|
def description
|
250
253
|
@expectation_message
|
251
254
|
end
|
data/lib/matchers/document.rb
CHANGED
@@ -70,6 +70,9 @@ module Mongoid
|
|
70
70
|
"Expected #{@klass.inspect} to not #{description}, got #{@klass.inspect} to #{description}"
|
71
71
|
end
|
72
72
|
|
73
|
+
alias :failure_message :failure_message_for_should
|
74
|
+
alias :failure_message_when_negated :failure_message_for_should_not
|
75
|
+
|
73
76
|
def description
|
74
77
|
desc = "have #{@attributes.size > 1 ? 'fields' : 'field'} named #{@attributes.collect(&:inspect).to_sentence}"
|
75
78
|
desc << " of type #{@type.inspect}" if @type
|
data/lib/matchers/indexes.rb
CHANGED
@@ -36,6 +36,9 @@ module Mongoid
|
|
36
36
|
"Expected #{@klass.inspect} to not #{description}, got #{@klass.inspect} to #{description}"
|
37
37
|
end
|
38
38
|
|
39
|
+
alias :failure_message :failure_message_for_should
|
40
|
+
alias :failure_message_when_negated :failure_message_for_should_not
|
41
|
+
|
39
42
|
def description
|
40
43
|
desc = "have an index for #{@index_fields.inspect}"
|
41
44
|
desc << " with options of #{@options.inspect}" if @options
|
data/lib/matchers/validations.rb
CHANGED
@@ -37,6 +37,9 @@ module Mongoid
|
|
37
37
|
"Expected #{@klass.inspect} to not #{description}; instead got #{@positive_result_message}"
|
38
38
|
end
|
39
39
|
|
40
|
+
alias :failure_message :failure_message_for_should
|
41
|
+
alias :failure_message_when_negated :failure_message_for_should_not
|
42
|
+
|
40
43
|
def description
|
41
44
|
desc = "have #{@type.inspect} validator on #{@field.inspect}"
|
42
45
|
desc << " on #{@options[:on]}" if @options[:on]
|
data/mongoid-rspec.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Sagge
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.1
|
33
|
+
version: '3.1'
|
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: 3.1
|
40
|
+
version: '3.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '3.1'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '3.1'
|
55
55
|
description: RSpec matches for Mongoid models, including association and validation
|
56
56
|
matchers
|
57
57
|
email: evansagge@gmail.com
|
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
131
|
rubyforge_project: mongoid-rspec
|
132
|
-
rubygems_version: 2.
|
132
|
+
rubygems_version: 2.4.5
|
133
133
|
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: RSpec matchers for Mongoid
|