glebtv-mongoid-rspec 1.12.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +0 -3
- data/README.md +1 -0
- data/glebtv-mongoid-rspec.gemspec +1 -1
- data/lib/matchers/accept_nested_attributes.rb +2 -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
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e0f4a897ffa7e2f6c8bd9d39c880b9f79359afb
|
4
|
+
data.tar.gz: 58ecfbd1bd90862b2663a4d9df5e65e2207db4d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86ce27abfa743b9d4f0cd189a0527d97f666941c322ae56b5fbc89bfa5930f305c1510fce306b7648cb2283a58e3390164d330bda529240342d809d7b94f8cbd
|
7
|
+
data.tar.gz: d8a48294b5babb3af38172e0c5eae82bf52d7117f9e87d6ff3f86b3042d4ad03900dec550b4eb9c17835479dcc926606ebfbfbe1e0c61e2d7fbb7d1d25a821c9
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.2
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,7 @@ mongoid-rspec
|
|
2
2
|
=
|
3
3
|
|
4
4
|
[![Build Status](https://secure.travis-ci.org/glebtv/mongoid-rspec.png?branch=master)](https://travis-ci.org/glebtv/mongoid-rspec)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/glebtv-mongoid-rspec.png)](http://badge.fury.io/rb/glebtv-mongoid-rspec)
|
5
6
|
|
6
7
|
http://rubygems.org/gems/glebtv-mongoid-rspec
|
7
8
|
|
@@ -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
@@ -54,6 +54,9 @@ module Mongoid
|
|
54
54
|
"Expected #{@klass.inspect} to not #{description}, got #{@klass.inspect} to #{description}"
|
55
55
|
end
|
56
56
|
|
57
|
+
alias :failure_message :failure_message_for_should
|
58
|
+
alias :failure_message_when_negated :failure_message_for_should_not
|
59
|
+
|
57
60
|
def description
|
58
61
|
desc = "have an index for #{@index_fields.inspect}"
|
59
62
|
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]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glebtv-mongoid-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Sagge
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-06-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -49,16 +49,16 @@ dependencies:
|
|
49
49
|
name: rspec
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 3.0.0
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 3.0.0
|
62
62
|
description: RSpec matches for Mongoid models, including association and validation
|
63
63
|
matchers
|
64
64
|
email: evansagge@gmail.com
|