shoulda-callback-matchers 1.1.2 → 1.1.3

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: 3f00ef72e66bbe84af996f2f435cb49add03642f
4
- data.tar.gz: 5bda94451994d17de1f96eba49790dfe5faef9c4
3
+ metadata.gz: 2c48688c5ae35880d42ec6979e7001f8a62b7703
4
+ data.tar.gz: bf752eb24fd0920ad56369067977d5fa7b4b33a1
5
5
  SHA512:
6
- metadata.gz: 34be6faad876bb3488742d1d6f05524440beb6808862e8b67f860859ed428fd52bbb6c67f1db7e5d4b2fe608a5fd10255406d6e11bb1f92ed2ea40ea9b87741b
7
- data.tar.gz: 296cfb37d4c2b111c36de75efe7211476a18ccc4e6107e20bd5c4bd54bdab62d0d0111d66e7c0f2b3ea657944bf70c23d73a5b2b4d7d94d11ca0b1f00dd0ef62
6
+ metadata.gz: ca176e69225fb315a809128efd556fa6535267a46bc3369a2c4d3be8118becbe9dac503202cbd591b81c6b137eb9a229c90829aa449a5a19419f8fe595ec4bcf
7
+ data.tar.gz: 114329bd6a67654dbda635c2aa92e1958a81e5d9a94258deb973c280ee6b6677938183babd4c54030a9eb4dd8145dfc2986a42c445d5b066e07470ac9d8a5b6d
data/.travis.yml CHANGED
@@ -20,6 +20,10 @@ gemfile:
20
20
 
21
21
  matrix:
22
22
  exclude:
23
+ - rvm: jruby-head
24
+ gemfile: gemfiles/rails_4.2.gemfile
25
+ - rvm: jruby-head
26
+ gemfile: gemfiles/rails_3.1.gemfile
23
27
  - rvm: 2.2.0
24
28
  gemfile: gemfiles/rails_4.0.gemfile
25
29
  - rvm: 2.2.0
data/Appraisals CHANGED
@@ -2,12 +2,14 @@ appraise 'rails 4.2' do
2
2
  gem 'rails', '~> 4.2.0'
3
3
  gem 'jquery-rails'
4
4
  gem 'sass-rails', '~> 4.0'
5
+ gem 'mocha'
5
6
  end
6
7
 
7
8
  appraise 'rails 4.1' do
8
9
  gem 'rails', '~> 4.1.0'
9
10
  gem 'jquery-rails'
10
11
  gem 'sass-rails', '~> 4.0'
12
+ gem 'mocha'
11
13
  end
12
14
 
13
15
  appraise 'rails 4.0' do
@@ -26,4 +28,4 @@ appraise 'rails 3.1' do
26
28
  gem 'rails', '~> 3.1.0'
27
29
  gem 'jquery-rails'
28
30
  gem 'sass-rails'
29
- end
31
+ end
@@ -12,5 +12,6 @@ gem "psych", :platform=>:rbx
12
12
  gem "rails", "~> 4.1.0"
13
13
  gem "jquery-rails"
14
14
  gem "sass-rails", "~> 4.0"
15
+ gem "mocha"
15
16
 
16
17
  gemspec :path=>"../"
@@ -12,5 +12,6 @@ gem "psych", :platform=>:rbx
12
12
  gem "rails", "~> 4.2.0"
13
13
  gem "jquery-rails"
14
14
  gem "sass-rails", "~> 4.0"
15
+ gem "mocha"
15
16
 
16
17
  gemspec :path=>"../"
@@ -5,32 +5,26 @@ include Shoulda::Callback::Matchers::RailsVersionHelper
5
5
  # in environments where test/unit is not required, this is necessary
6
6
  unless defined?(Test::Unit::TestCase)
7
7
  begin
8
- require rails_version == '4.1' ? 'minitest' : 'test/unit/testcase'
8
+ require rails_version >= '4.1' ? 'minitest' : 'test/unit/testcase'
9
9
  rescue LoadError
10
10
  # silent
11
11
  end
12
12
  end
13
13
 
14
- if defined?(::ActiveRecord)
14
+ if defined?(Test::Unit::TestCase) && (defined?(::ActiveModel) || defined?(::ActiveRecord))
15
15
  require 'shoulda/callback/matchers/active_model'
16
16
 
17
- module Test
18
- module Unit
19
- class TestCase
20
- include Shoulda::Callback::Matchers::ActiveModel
21
- extend Shoulda::Callback::Matchers::ActiveModel
22
- end
23
- end
17
+ Test::Unit::TestCase.tap do |test_unit|
18
+ test_unit.send :include, Shoulda::Callback::Matchers::ActiveModel
19
+ test_unit.send :extend, Shoulda::Callback::Matchers::ActiveModel
24
20
  end
25
- elsif defined?(::ActiveModel)
21
+
22
+ elsif defined?(MiniTest::Unit::TestCase) && (defined?(::ActiveModel) || defined?(::ActiveRecord))
26
23
  require 'shoulda/callback/matchers/active_model'
27
-
28
- module Test
29
- module Unit
30
- class TestCase
31
- include Shoulda::Callback::Matchers::ActiveModel
32
- extend Shoulda::Callback::Matchers::ActiveModel
33
- end
34
- end
24
+
25
+ MiniTest::Unit::TestCase.tap do |minitest_unit|
26
+ minitest_unit.send :include, Shoulda::Callback::Matchers::ActiveModel
27
+ minitest_unit.send :extend, Shoulda::Callback::Matchers::ActiveModel
35
28
  end
29
+
36
30
  end
@@ -1,7 +1,7 @@
1
1
  module Shoulda
2
2
  module Callback
3
3
  module Matchers
4
- VERSION = '1.1.2'.freeze
4
+ VERSION = '1.1.3'.freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoulda-callback-matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Beat Richartz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-17 00:00:00.000000000 Z
11
+ date: 2015-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport