seatbelt 0.3.0 → 0.3.1

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: a73542ab17c3162508ea61ab8c5fc01d337a176b
4
- data.tar.gz: 3539ae306179a86e2d05a24e68500b711b44a6d5
3
+ metadata.gz: 77b160e542b69e2cb2c1cf37eac93756d3ebbbae
4
+ data.tar.gz: 06a3fd08f4162714ba7ecbeeeb2a4ac366e3fb2b
5
5
  SHA512:
6
- metadata.gz: 51e42e262d575d7a27452438b1c433577a03d99c8ab72c431f114d15d78dcc5a75d4a1ee7b229966c8ef774d435c37ca62eeab10b2100bf87134c666dbefe01b
7
- data.tar.gz: b199c476a01ae3e6fbb16962b515fd96778140e368897ef1f068db60a8ad592196589c05a126908fa15a0eff5e2ec2362186329847567a20bc559f6e34bbbae3
6
+ metadata.gz: a688d0d651421b8794a5ec977ad648f5d74661864a9e821a5840200ad073beab740378ab6990c5897a394522c5ca7fbd09097f619032e09fe7ebbd8521e87c18
7
+ data.tar.gz: 48e81a7e035542e9c41171ee92643fa5c27a860ff2852212401f74bfc53d84e74a489c93d939cd26a36031bbd672eb81e34a1271f8864ca3bcf4eb9aa41b5a52
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.3.1
4
+
5
+ * bugfix for Rails 4.1 and Minitest 5.x support
6
+
3
7
  ## 0.3.0
4
8
 
5
9
  * added support for Rails 4.1 and Minitest >= 5.x (thanks to [@clod81](https://github.com/clod81))
data/Gemfile CHANGED
@@ -2,6 +2,6 @@ source "https://rubygems.org"
2
2
 
3
3
  gem 'rubysl', :platforms => :rbx
4
4
  gem "jruby-openssl", :platforms => :jruby
5
- gem "rails", "4.0.2"
5
+ gem "rails", "4.1.0"
6
6
 
7
7
  gemspec
@@ -1,3 +1,3 @@
1
1
  module Seatbelt
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
data/lib/seatbelt.rb CHANGED
@@ -12,13 +12,13 @@ if defined?(Test)
12
12
  end
13
13
 
14
14
  if defined?(Minitest)
15
- if defined?(Minitest::Unit)
15
+ if Minitest::Unit::VERSION[0].to_i < 5
16
16
  class Minitest::Unit::TestCase
17
17
  include Seatbelt::AssertContentType if defined?(ActionController)
18
18
  include Seatbelt::AssertJson
19
19
  include Seatbelt::AssertMail if defined?(ActionMailer)
20
20
  end
21
- else # Minitest >= 5.x
21
+ else
22
22
  class Minitest::Test
23
23
  include Seatbelt::AssertContentType if defined?(ActionController)
24
24
  include Seatbelt::AssertJson
@@ -1,6 +1,6 @@
1
1
  require 'test_helper'
2
2
 
3
- class Seatbelt::AssertContentTypeTest < Minitest::Unit::TestCase
3
+ class Seatbelt::AssertContentTypeTest < Minitest::Test
4
4
  include Seatbelt::AssertContentType
5
5
 
6
6
  def test_assert_content_type_short
@@ -1,6 +1,6 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/test_helper')
2
2
 
3
- class Seatbelt::AssertJsonTest < Minitest::Unit::TestCase
3
+ class Seatbelt::AssertJsonTest < Minitest::Test
4
4
  include Seatbelt::AssertJson
5
5
 
6
6
  # def test_string
@@ -26,7 +26,7 @@ class Seatbelt::AssertJsonTest < Minitest::Unit::TestCase
26
26
  json.element 'key', /alu/
27
27
  end
28
28
  end
29
-
29
+
30
30
  def test_single_hash
31
31
  assert_json '{"key":"value"}' do |json|
32
32
  json.element 'key', 'value'
@@ -46,7 +46,7 @@ class Seatbelt::AssertJsonTest < Minitest::Unit::TestCase
46
46
  end
47
47
  end
48
48
  end
49
-
49
+
50
50
  def test_not_element
51
51
  assert_json '{"key":"value"}' do |json|
52
52
  json.element 'key', 'value'
@@ -60,7 +60,7 @@ class Seatbelt::AssertJsonTest < Minitest::Unit::TestCase
60
60
  end
61
61
  end
62
62
  end
63
-
63
+
64
64
  def test_array
65
65
  assert_json '["value1","value2","value3"]' do |json|
66
66
  json.element 'value1'
@@ -97,7 +97,7 @@ class Seatbelt::AssertJsonTest < Minitest::Unit::TestCase
97
97
  end
98
98
  end
99
99
  end
100
-
100
+
101
101
  def test_nested_arrays
102
102
  assert_json '[[["deep","another_depp"],["second_deep"]]]' do |json|
103
103
  json.element [["deep","another_depp"],["second_deep"]]
@@ -115,7 +115,7 @@ class Seatbelt::AssertJsonTest < Minitest::Unit::TestCase
115
115
  end
116
116
  end
117
117
  end
118
-
118
+
119
119
  def test_hash_with_value_array
120
120
  assert_json '{"key":["value1","value2"]}' do |json|
121
121
  json.element 'key', ['value1', 'value2']
@@ -169,7 +169,7 @@ class Seatbelt::AssertJsonTest < Minitest::Unit::TestCase
169
169
  end
170
170
  end
171
171
  end
172
-
172
+
173
173
  def test_array_with_two_hashes
174
174
  assert_json '[{"key1":"value1"}, {"key2":"value2"}]' do |json|
175
175
  json.element 'key1', 'value1'
@@ -197,7 +197,7 @@ class Seatbelt::AssertJsonTest < Minitest::Unit::TestCase
197
197
  end
198
198
  end
199
199
  end
200
-
200
+
201
201
  def test_nested_hashes
202
202
  assert_json '{"outer_key":{"key":{"inner_key":"value"}}}' do |json|
203
203
  json.element 'outer_key' do
@@ -1,6 +1,6 @@
1
1
  require 'test_helper'
2
2
 
3
- class Seatbelt::AssertJsonNewDslTest < Minitest::Unit::TestCase
3
+ class Seatbelt::AssertJsonNewDslTest < Minitest::Test
4
4
  include Seatbelt::AssertJson
5
5
 
6
6
  # def test_string
@@ -1,6 +1,6 @@
1
1
  require 'test_helper'
2
2
 
3
- class Seatbelt::AssertMailTest < Minitest::Unit::TestCase
3
+ class Seatbelt::AssertMailTest < Minitest::Test
4
4
 
5
5
  def test_assert_mail
6
6
  Mailer.test.deliver
data/test/test_helper.rb CHANGED
@@ -14,7 +14,7 @@ Dir[File.dirname(__FILE__) + "/helpers/**/*.rb"].sort.each { |f| require File.ex
14
14
 
15
15
  # Turn.config.format = :dot
16
16
 
17
- class Minitest::Unit::TestCase
17
+ class Minitest::Test
18
18
  def assert_assertion_fails(&block)
19
19
  if Object.const_defined?(:MiniTest)
20
20
  assert_raises(MiniTest::Assertion, &block)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seatbelt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thorsten Böttger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-18 00:00:00.000000000 Z
11
+ date: 2014-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json