seatbelt 1.0.0 → 2.0.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
- SHA1:
3
- metadata.gz: 06bb8731092696d92a7ab020c1602b9569c7883c
4
- data.tar.gz: 2a1f13f29509de19d994190831765a9ec53e3c66
2
+ SHA256:
3
+ metadata.gz: 8823d18a4d3a72fb1698db76f55ec67028035fcc5d7928263c8ed777b3101a72
4
+ data.tar.gz: 3d751c9f02bc549675049f233dfed047d340f6273afbce09fd83f2ec354fc01e
5
5
  SHA512:
6
- metadata.gz: 9f373f9fba2931cac9fcabc7df96b6c20daef37b2167be993bee2dd5e99b41aacc7d4a7dfeaf4428ebfc3f698c32bdd24b5203856706042779181e47b8a2aef1
7
- data.tar.gz: e8d028cfd36c124c14bc92ae7f0da6da530ead344ccac02fab9209ba3c6c1fc80fb3908ebac2401ec8b7b0cc3332202ae9aa5835eb24be5b488bc1f2bf2b0419
6
+ metadata.gz: 8f5606bb8f6f6d39546f281d939ed16f617530624eb27128cc54964776c3d05f27a871402e58f88edd168786fce072f043c9b04317130aec761e81749a9c7e01
7
+ data.tar.gz: f4e35d262e1c4be956758aae497b1fa2db8ede185d830f332b9e9395c5bc32884a14db427567075d6dedd773a61b29269455d6e456e528eb3e4eaf2dc1be881c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.0.0
4
+
5
+ * **breaking change**: drop support for test-unit and older versions of minitest
6
+ * support Rails `>= 6.0`
7
+
3
8
  ## 1.0.0
4
9
 
5
10
  * support Rails `5.0`
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem 'rubysl', :platforms => :rbx
4
- gem "jruby-openssl", :platforms => :jruby
5
- gem "rails", '~> 4'
3
+ # gem 'rubysl', :platforms => :rbx
4
+ # gem "jruby-openssl", :platforms => :jruby
5
+ gem "rails", '~> 6'
6
6
 
7
7
  gemspec
@@ -1,3 +1,3 @@
1
1
  module Seatbelt
2
- VERSION = "1.0.0"
2
+ VERSION = "2.0.0"
3
3
  end
data/lib/seatbelt.rb CHANGED
@@ -12,17 +12,9 @@ if defined?(Test)
12
12
  end
13
13
 
14
14
  if defined?(Minitest)
15
- if Minitest::Unit::VERSION[0].to_i < 5
16
- class Minitest::Unit::TestCase
17
- include Seatbelt::AssertContentType if defined?(ActionController)
18
- include AssertJson
19
- include Seatbelt::AssertMail if defined?(ActionMailer)
20
- end
21
- else
22
- class Minitest::Test
23
- include Seatbelt::AssertContentType if defined?(ActionController)
24
- include AssertJson
25
- include Seatbelt::AssertMail if defined?(ActionMailer)
26
- end
15
+ class Minitest::Test
16
+ include Seatbelt::AssertContentType if defined?(ActionController)
17
+ include AssertJson
18
+ include Seatbelt::AssertMail if defined?(ActionMailer)
27
19
  end
28
20
  end
@@ -7,7 +7,7 @@ class Mailer < ActionMailer::Base
7
7
  :cc => 'cc@seatbelt.co.nz',
8
8
  :bcc => 'bcc@seatbelt.co.nz',
9
9
  :subject => 'mail subject'}.merge(options)) do |format|
10
- format.text { render :text => options[:body] || 'mail body text' }
10
+ format.text { render :plain => options[:body] || 'mail body text' }
11
11
  end
12
12
  end
13
13
 
data/test/test_helper.rb CHANGED
@@ -2,7 +2,7 @@ require 'maxitest/autorun'
2
2
  require 'active_support'
3
3
  require 'action_mailer'
4
4
  require 'json'
5
- require 'mocha/setup'
5
+ require 'mocha/minitest'
6
6
 
7
7
  $:.push File.expand_path("../../lib", __FILE__)
8
8
  require File.dirname(__FILE__) + '/../lib/seatbelt.rb'
@@ -15,10 +15,6 @@ Dir[File.dirname(__FILE__) + "/helpers/**/*.rb"].sort.each { |f| require File.ex
15
15
 
16
16
  class Minitest::Test
17
17
  def assert_assertion_fails(&block)
18
- if Object.const_defined?(:MiniTest)
19
- assert_raises(MiniTest::Assertion, &block)
20
- else
21
- assert_raises(Test::Unit::AssertionFailedError, &block)
22
- end
18
+ assert_raises(::Minitest::Assertion, &block)
23
19
  end
24
20
  end
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: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thorsten Böttger
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-14 00:00:00.000000000 Z
11
+ date: 2023-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: assert_json
@@ -129,7 +129,7 @@ homepage: https://github.com/alto/seatbelt
129
129
  licenses:
130
130
  - MIT
131
131
  metadata: {}
132
- post_install_message:
132
+ post_install_message:
133
133
  rdoc_options: []
134
134
  require_paths:
135
135
  - lib
@@ -144,9 +144,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  requirements: []
147
- rubyforge_project:
148
- rubygems_version: 2.4.5
149
- signing_key:
147
+ rubygems_version: 3.3.26
148
+ signing_key:
150
149
  specification_version: 4
151
150
  summary: Provide custom assertions for Ruby and Ruby on Rails
152
151
  test_files: