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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76dd726673da7e51fdcde111e974872642fb051b
4
- data.tar.gz: 6fe74deeab91df64ce8c394ce40a987d4ed5fcfc
3
+ metadata.gz: 2e373f490fec51c9e0979581b1aaf23eb388ef7e
4
+ data.tar.gz: 621a4a07fb6000b20bb9e6ee7525260cbaf02731
5
5
  SHA512:
6
- metadata.gz: f3e15148818b68310e8cde9993a8310459f96e7447381d324a0fe963c15d6304ae23975277bf2fa96f378dbbf40f62a27ef7a4db38ad59319ab3890390e7c2b5
7
- data.tar.gz: fb9b39a0f1a95857334f3a30c2d1c81b406c1c634e6632abe59da8aec1c081666a0f187d673113564c6524892d4dc219c78ee144bf9522d440e8d1f61643f8a5
6
+ metadata.gz: c851e33fb1418893b64114d792339eaf7c0b5d501acc89d81045bda1d4ef2ab69acd14aa6429ca87923e40f78bede35827f2f02de2d4d2d4724b88f00427fa42
7
+ data.tar.gz: f54e0944fdd27f42fa84d789581da999dd3993a46f80efc574e40343c38d960000b3130705b4a91495ec913286aae9278a3d513642d157c6bbcc5458caa44b9a
data/.gitignore CHANGED
@@ -4,6 +4,7 @@
4
4
  .config
5
5
  .yardoc
6
6
  Gemfile.lock
7
+ gemfiles/*.lock
7
8
  InstalledFiles
8
9
  _yardoc
9
10
  coverage
@@ -1,12 +1,19 @@
1
1
  language: ruby
2
- before_install:
3
- - gem install bundler
4
2
  rvm:
5
- - 1.9.3
6
- - 2.0.0
3
+ - 2.1
4
+ - 2.2
7
5
  - ruby-head
8
6
  - rbx-19mode
9
7
  gemfile:
10
8
  - Gemfile
11
- - Gemfile.rails4
12
- - Gemfile.edge
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
@@ -1,3 +1,9 @@
1
+ # 1.1.0
2
+
3
+ + Upgrade to minitest 5
4
+ + Add minitest-matchers_vaccine support
5
+ + Add support for Ruby 2.1 and 2.2
6
+
1
7
  # 1.0.0 - February 27, 2013
2
8
 
3
9
  + Add `validate_exclusion_of` matcher.
data/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # minitest-activemodel
2
2
 
3
- [![Build Status](https://secure.travis-ci.org/frodsan/minitest-activemodel.png?branch=master&.png)](http://travis-ci.org/frodsan/minitest-activemodel)
4
- [![Dependency Status](https://gemnasium.com/frodsan/minitest-activemodel.png)](https://gemnasium.com/frodsan/minitest-activemodel)
5
- [![Code Climate](https://codeclimate.com/github/frodsan/minitest-activemodel.png)](https://codeclimate.com/github/frodsan/minitest-activemodel)
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)
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: '../'
4
+ gem 'minitest-matchers_vaccine'
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: '../'
4
+ gem 'activemodel', '~> 3.2.0'
5
+ gem 'activerecord', '~> 3.2.0'
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: '../'
4
+ gem 'activemodel', '~> 4.2.0'
5
+ gem 'activerecord', '~> 4.2.0'
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: '../'
4
+ gem 'activemodel', github: 'rails/rails'
5
+ gem 'activerecord', github: 'rails/rails'
6
+ gem 'arel', github: 'rails/arel'
@@ -1,4 +1,8 @@
1
- require 'minitest/matchers'
1
+ begin
2
+ require 'minitest/matchers_vaccine'
3
+ rescue LoadError
4
+ require 'minitest/matchers'
5
+ end
2
6
  require 'matchers/helpers'
3
7
  require 'matchers/validation_matcher'
4
8
  require 'matchers/validate_acceptance_matcher'
@@ -2,10 +2,10 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'minitest-activemodel'
5
- gem.version = '1.0.0'
5
+ gem.version = '1.1.0'
6
6
 
7
- gem.authors = ['Francesco Rodriguez']
8
- gem.email = ['lrodriguezsanc@gmail.com']
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', '~> 4.1'
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'
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
  require 'models/user'
3
3
 
4
- class ValidateAcceptanceTest < MiniTest::Unit::TestCase
4
+ class ValidateAcceptanceTest < Minitest::Test
5
5
  test 'must validate acceptance of an attribute' do
6
6
  assert_must validate_acceptance_of(:eula), 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 ValidateAssociatedMatcherTest < MiniTest::Unit::TestCase
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 < MiniTest::Unit::TestCase
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 < MiniTest::Unit::TestCase
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 < MiniTest::Unit::TestCase
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 < MiniTest::Unit::TestCase
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 < MiniTest::Unit::TestCase
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
@@ -1,6 +1,6 @@
1
1
  require 'test_helper'
2
2
 
3
- class ValidationMatcherTest < MiniTest::Unit::TestCase
3
+ class ValidationMatcherTest < Minitest::Test
4
4
  def setup
5
5
  @validator = ValidationMatcher.new :attr, :type
6
6
  end
@@ -3,7 +3,7 @@ require 'minitest/autorun'
3
3
  require 'active_support/testing/declarative'
4
4
  require 'minitest-activemodel'
5
5
 
6
- class MiniTest::Unit::TestCase
6
+ class Minitest::Test
7
7
  include MiniTest::Matchers::ActiveModel
8
8
  extend ActiveSupport::Testing::Declarative
9
9
  end
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.0.0
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: 2013-02-27 00:00:00.000000000 Z
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: '4.1'
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: '4.1'
27
+ version: '5.0'
27
28
  - !ruby/object:Gem::Dependency
28
- name: minitest-matchers
29
+ name: activemodel
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
- - - ~>
32
+ - - ">="
32
33
  - !ruby/object:Gem::Version
33
- version: '1.2'
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: '1.2'
41
+ version: '3.2'
41
42
  - !ruby/object:Gem::Dependency
42
- name: activemodel
43
+ name: minitest-matchers
43
44
  requirement: !ruby/object:Gem::Requirement
44
45
  requirements:
45
- - - '>='
46
+ - - ">="
46
47
  - !ruby/object:Gem::Version
47
- version: '3.2'
48
- type: :runtime
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: '3.2'
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
- - lrodriguezsanc@gmail.com
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.0.0
167
+ rubygems_version: 2.4.5
164
168
  signing_key:
165
169
  specification_version: 4
166
170
  summary: MiniTest matchers for ActiveModel::Validations
@@ -1,5 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- gem 'rails', github: 'rails/rails'
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- gem 'activemodel', '4.0.0.beta1'
6
- gem 'activerecord', '4.0.0.beta1'