minitest-activemodel 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +13 -6
- data/CHANGELOG.md +6 -0
- data/README.md +10 -3
- data/gemfiles/matchers_vaccine.gemfile +4 -0
- data/gemfiles/rails-3.2.gemfile +5 -0
- data/gemfiles/rails-4.2.gemfile +5 -0
- data/gemfiles/rails-master.gemfile +6 -0
- data/lib/minitest-activemodel.rb +5 -1
- data/minitest-activemodel.gemspec +5 -5
- data/test/cases/validate_acceptance_matcher_test.rb +1 -1
- data/test/cases/validate_associated_matcher_test.rb +1 -1
- data/test/cases/validate_confirmation_matcher_test.rb +1 -1
- data/test/cases/validate_format_matcher_test.rb +1 -1
- data/test/cases/validate_length_matcher_test.rb +1 -1
- data/test/cases/validate_presence_matcher_test.rb +1 -1
- data/test/cases/validate_uniqueness_matcher_test.rb +1 -1
- data/test/cases/validation_matcher_test.rb +1 -1
- data/test/test_helper.rb +1 -1
- metadata +36 -32
- data/Gemfile.edge +0 -5
- data/Gemfile.rails4 +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e373f490fec51c9e0979581b1aaf23eb388ef7e
|
4
|
+
data.tar.gz: 621a4a07fb6000b20bb9e6ee7525260cbaf02731
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c851e33fb1418893b64114d792339eaf7c0b5d501acc89d81045bda1d4ef2ab69acd14aa6429ca87923e40f78bede35827f2f02de2d4d2d4724b88f00427fa42
|
7
|
+
data.tar.gz: f54e0944fdd27f42fa84d789581da999dd3993a46f80efc574e40343c38d960000b3130705b4a91495ec913286aae9278a3d513642d157c6bbcc5458caa44b9a
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,12 +1,19 @@
|
|
1
1
|
language: ruby
|
2
|
-
before_install:
|
3
|
-
- gem install bundler
|
4
2
|
rvm:
|
5
|
-
- 1
|
6
|
-
- 2.
|
3
|
+
- 2.1
|
4
|
+
- 2.2
|
7
5
|
- ruby-head
|
8
6
|
- rbx-19mode
|
9
7
|
gemfile:
|
10
8
|
- Gemfile
|
11
|
-
-
|
12
|
-
-
|
9
|
+
- gemfiles/matchers_vaccine.gemfile
|
10
|
+
- gemfiles/rails-3.2.gemfile
|
11
|
+
- gemfiles/rails-4.2.gemfile
|
12
|
+
- gemfiles/rails-master.gemfile
|
13
|
+
matrix:
|
14
|
+
exclude:
|
15
|
+
- rvm: 2.2
|
16
|
+
gemfile: gemfiles/rails-3.2.gemfile
|
17
|
+
allow_failures:
|
18
|
+
- gemfile: gemfiles/rails-master.gemfile
|
19
|
+
fast_finish: true
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
# minitest-activemodel
|
2
2
|
|
3
|
-
[![
|
4
|
-
[![
|
5
|
-
[![
|
3
|
+
[![Gem Version](http://img.shields.io/gem/v/minitest-activemodel.svg)](https://rubygems.org/gems/minitest-activemodel)
|
4
|
+
[![Build Status](https://secure.travis-ci.org/frodsan/minitest-activemodel.svg?branch=master)](http://travis-ci.org/frodsan/minitest-activemodel)
|
5
|
+
[![Dependency Status](https://gemnasium.com/frodsan/minitest-activemodel.svg)](https://gemnasium.com/frodsan/minitest-activemodel)
|
6
|
+
[![Code Climate](https://codeclimate.com/github/frodsan/minitest-activemodel.svg)](https://codeclimate.com/github/frodsan/minitest-activemodel)
|
6
7
|
|
7
8
|
MiniTest matchers for `ActiveModel::Validations`.
|
8
9
|
|
@@ -27,6 +28,12 @@ Or install it yourself as:
|
|
27
28
|
|
28
29
|
$ gem install minitest-activemodel
|
29
30
|
|
31
|
+
Then, you have to include the matchers into `Minitest::Test`
|
32
|
+
|
33
|
+
class Minitest::Test
|
34
|
+
include MiniTest::Matchers::ActiveModel
|
35
|
+
end
|
36
|
+
|
30
37
|
## Usage
|
31
38
|
|
32
39
|
Check the [official documentation](http://rubydoc.info/github/frodsan/minitest-activemodel/master/frames)
|
data/lib/minitest-activemodel.rb
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = 'minitest-activemodel'
|
5
|
-
gem.version = '1.
|
5
|
+
gem.version = '1.1.0'
|
6
6
|
|
7
|
-
gem.authors = ['Francesco Rodriguez']
|
8
|
-
gem.email = ['
|
7
|
+
gem.authors = ['Francesco Rodriguez', 'Ryan McGeary']
|
8
|
+
gem.email = ['frodsan@protonmail.ch', 'ryan@mcgeary.org']
|
9
9
|
gem.description = %q{MiniTest matchers for ActiveModel::Validations}
|
10
10
|
gem.summary = gem.description
|
11
11
|
gem.homepage = 'https://github.com/frodsan/minitest-activemodel'
|
@@ -20,10 +20,10 @@ Gem::Specification.new do |gem|
|
|
20
20
|
|
21
21
|
gem.required_ruby_version = '>= 1.9.3'
|
22
22
|
|
23
|
-
gem.add_dependency 'minitest', '~>
|
24
|
-
gem.add_dependency 'minitest-matchers', '~> 1.2'
|
23
|
+
gem.add_dependency 'minitest', '~> 5.0'
|
25
24
|
gem.add_dependency 'activemodel', '>= 3.2'
|
26
25
|
|
26
|
+
gem.add_development_dependency 'minitest-matchers'
|
27
27
|
gem.add_development_dependency 'activerecord', '>= 3.2'
|
28
28
|
gem.add_development_dependency 'sqlite3', '~> 1.3.6'
|
29
29
|
gem.add_development_dependency 'rake'
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
require 'ar_test_helper'
|
3
3
|
require 'models/person'
|
4
4
|
|
5
|
-
class ValidateAssociatedMatcherTest <
|
5
|
+
class ValidateAssociatedMatcherTest < Minitest::Test
|
6
6
|
test 'must validate exists association' do
|
7
7
|
assert_must validate_associated(:posts), Person
|
8
8
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
require 'models/user'
|
3
3
|
|
4
|
-
class ValidateConfirmationMatcherTest <
|
4
|
+
class ValidateConfirmationMatcherTest < Minitest::Test
|
5
5
|
test 'must validate confirmation of an attribute' do
|
6
6
|
assert_must validate_confirmation_of(:password), User
|
7
7
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
|
-
class ValidateFormatMatcherTest <
|
3
|
+
class ValidateFormatMatcherTest < Minitest::Test
|
4
4
|
test 'raises ArgumentError when no option is given' do
|
5
5
|
assert_raises(ArgumentError) { assert_must validate_format_of(:email), User}
|
6
6
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
require 'models/user'
|
3
3
|
|
4
|
-
class ValidateLengthMatcher <
|
4
|
+
class ValidateLengthMatcher < Minitest::Test
|
5
5
|
test 'raises ArgumentError when no option is given' do
|
6
6
|
assert_raises(ArgumentError) { assert_must validate_length_of(:name), User }
|
7
7
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
require 'models/user'
|
3
3
|
|
4
|
-
class ValidatePresenceMatcherTest <
|
4
|
+
class ValidatePresenceMatcherTest < Minitest::Test
|
5
5
|
test 'must validate presence of a required attribute' do
|
6
6
|
assert_must validate_presence_of(:name), User
|
7
7
|
end
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
require 'ar_test_helper'
|
3
3
|
require 'models/person'
|
4
4
|
|
5
|
-
class ValidateUniquenessMatcherTest <
|
5
|
+
class ValidateUniquenessMatcherTest < Minitest::Test
|
6
6
|
test 'must validate uniqueness of an attribute' do
|
7
7
|
assert_must validate_uniqueness_of(:email), Person
|
8
8
|
end
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,102 +1,104 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-activemodel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francesco Rodriguez
|
8
|
+
- Ryan McGeary
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2015-06-08 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: minitest
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
16
17
|
requirements:
|
17
|
-
- - ~>
|
18
|
+
- - "~>"
|
18
19
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
+
version: '5.0'
|
20
21
|
type: :runtime
|
21
22
|
prerelease: false
|
22
23
|
version_requirements: !ruby/object:Gem::Requirement
|
23
24
|
requirements:
|
24
|
-
- - ~>
|
25
|
+
- - "~>"
|
25
26
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
27
|
+
version: '5.0'
|
27
28
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
29
|
+
name: activemodel
|
29
30
|
requirement: !ruby/object:Gem::Requirement
|
30
31
|
requirements:
|
31
|
-
- -
|
32
|
+
- - ">="
|
32
33
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
+
version: '3.2'
|
34
35
|
type: :runtime
|
35
36
|
prerelease: false
|
36
37
|
version_requirements: !ruby/object:Gem::Requirement
|
37
38
|
requirements:
|
38
|
-
- -
|
39
|
+
- - ">="
|
39
40
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
41
|
+
version: '3.2'
|
41
42
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
43
|
+
name: minitest-matchers
|
43
44
|
requirement: !ruby/object:Gem::Requirement
|
44
45
|
requirements:
|
45
|
-
- -
|
46
|
+
- - ">="
|
46
47
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
48
|
-
type: :
|
48
|
+
version: '0'
|
49
|
+
type: :development
|
49
50
|
prerelease: false
|
50
51
|
version_requirements: !ruby/object:Gem::Requirement
|
51
52
|
requirements:
|
52
|
-
- -
|
53
|
+
- - ">="
|
53
54
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
55
|
+
version: '0'
|
55
56
|
- !ruby/object:Gem::Dependency
|
56
57
|
name: activerecord
|
57
58
|
requirement: !ruby/object:Gem::Requirement
|
58
59
|
requirements:
|
59
|
-
- -
|
60
|
+
- - ">="
|
60
61
|
- !ruby/object:Gem::Version
|
61
62
|
version: '3.2'
|
62
63
|
type: :development
|
63
64
|
prerelease: false
|
64
65
|
version_requirements: !ruby/object:Gem::Requirement
|
65
66
|
requirements:
|
66
|
-
- -
|
67
|
+
- - ">="
|
67
68
|
- !ruby/object:Gem::Version
|
68
69
|
version: '3.2'
|
69
70
|
- !ruby/object:Gem::Dependency
|
70
71
|
name: sqlite3
|
71
72
|
requirement: !ruby/object:Gem::Requirement
|
72
73
|
requirements:
|
73
|
-
- - ~>
|
74
|
+
- - "~>"
|
74
75
|
- !ruby/object:Gem::Version
|
75
76
|
version: 1.3.6
|
76
77
|
type: :development
|
77
78
|
prerelease: false
|
78
79
|
version_requirements: !ruby/object:Gem::Requirement
|
79
80
|
requirements:
|
80
|
-
- - ~>
|
81
|
+
- - "~>"
|
81
82
|
- !ruby/object:Gem::Version
|
82
83
|
version: 1.3.6
|
83
84
|
- !ruby/object:Gem::Dependency
|
84
85
|
name: rake
|
85
86
|
requirement: !ruby/object:Gem::Requirement
|
86
87
|
requirements:
|
87
|
-
- -
|
88
|
+
- - ">="
|
88
89
|
- !ruby/object:Gem::Version
|
89
90
|
version: '0'
|
90
91
|
type: :development
|
91
92
|
prerelease: false
|
92
93
|
version_requirements: !ruby/object:Gem::Requirement
|
93
94
|
requirements:
|
94
|
-
- -
|
95
|
+
- - ">="
|
95
96
|
- !ruby/object:Gem::Version
|
96
97
|
version: '0'
|
97
98
|
description: MiniTest matchers for ActiveModel::Validations
|
98
99
|
email:
|
99
|
-
-
|
100
|
+
- frodsan@protonmail.ch
|
101
|
+
- ryan@mcgeary.org
|
100
102
|
executables: []
|
101
103
|
extensions: []
|
102
104
|
extra_rdoc_files:
|
@@ -104,16 +106,18 @@ extra_rdoc_files:
|
|
104
106
|
- LICENSE.md
|
105
107
|
- README.md
|
106
108
|
files:
|
107
|
-
- .gitignore
|
108
|
-
- .travis.yml
|
109
|
+
- ".gitignore"
|
110
|
+
- ".travis.yml"
|
109
111
|
- CHANGELOG.md
|
110
112
|
- CONTRIBUTING.md
|
111
113
|
- Gemfile
|
112
|
-
- Gemfile.edge
|
113
|
-
- Gemfile.rails4
|
114
114
|
- LICENSE.md
|
115
115
|
- README.md
|
116
116
|
- Rakefile
|
117
|
+
- gemfiles/matchers_vaccine.gemfile
|
118
|
+
- gemfiles/rails-3.2.gemfile
|
119
|
+
- gemfiles/rails-4.2.gemfile
|
120
|
+
- gemfiles/rails-master.gemfile
|
117
121
|
- lib/matchers/helpers.rb
|
118
122
|
- lib/matchers/validate_acceptance_matcher.rb
|
119
123
|
- lib/matchers/validate_associated_matcher.rb
|
@@ -145,22 +149,22 @@ licenses:
|
|
145
149
|
metadata: {}
|
146
150
|
post_install_message:
|
147
151
|
rdoc_options:
|
148
|
-
- --charset=UTF-8
|
152
|
+
- "--charset=UTF-8"
|
149
153
|
require_paths:
|
150
154
|
- lib
|
151
155
|
required_ruby_version: !ruby/object:Gem::Requirement
|
152
156
|
requirements:
|
153
|
-
- -
|
157
|
+
- - ">="
|
154
158
|
- !ruby/object:Gem::Version
|
155
159
|
version: 1.9.3
|
156
160
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
161
|
requirements:
|
158
|
-
- -
|
162
|
+
- - ">="
|
159
163
|
- !ruby/object:Gem::Version
|
160
164
|
version: '0'
|
161
165
|
requirements: []
|
162
166
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.
|
167
|
+
rubygems_version: 2.4.5
|
164
168
|
signing_key:
|
165
169
|
specification_version: 4
|
166
170
|
summary: MiniTest matchers for ActiveModel::Validations
|
data/Gemfile.edge
DELETED