test-unit-rails 5.0.1 → 5.0.2

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: 59b1c936377ee26c94b9ea8237f1f450b8299664
4
- data.tar.gz: e442101c03263eba1ca883c962d1aad3a911dd3b
3
+ metadata.gz: acd6bc4c504618b66ee6d98839dd9c90fe29d3fe
4
+ data.tar.gz: 68a281dd10ddc289981e805a883113566e854dc3
5
5
  SHA512:
6
- metadata.gz: 071e81445922d025034e2f57f4ef30cd9b3684cae41a757fcbaeb71d5b19fc7e4314cf2b152faa1bb346f59c2a86e3cf4f0b9ac646a4501c4158fdf4c5c56e88
7
- data.tar.gz: 214cedd4ade97cf2abd4736de179169474e573e57aef363da81e5d452f6ec5ea1c9faa96a9cfcb014dd060060d69e82011a7f5bcd54876a28e0284ecbdcb65e7
6
+ metadata.gz: 54b69f718f3c1dc43e17d12a6941b78170fb23f2662cb35eda6ca8dcf33452682869c84e831fac1778f36a18c28ec3273ff50741bb033e4ed6fec470be7afa18
7
+ data.tar.gz: 56ce49658c0a87f8da484b9514bbe5a71856ba3189cc5c8c4653e77f5154032b8ec4e9085e07d1c4e9170bf2ed5572bf2e884164fba1068fd8d18248a86b4a8f
@@ -1,5 +1,22 @@
1
1
  h1. News
2
2
 
3
+ h2(#5-0-2). 5.0.2 - 2016-06-28
4
+
5
+ h2. Improvements
6
+
7
+ * Supported Rails applications that don't use Active Record.
8
+ [GitHub#8][Patch by Akira Matsuda]
9
+
10
+ h2. Fixes
11
+
12
+ * Fixed test failure. [Reported by Shita Koyanagi]
13
+
14
+ h2. Thanks
15
+
16
+ * Shita Koyanagi
17
+
18
+ * Akira Matsuda
19
+
3
20
  h2(#5-0-1). 5.0.1 - 2016-02-27
4
21
 
5
22
  h2. Fixes
@@ -62,9 +62,12 @@ class ActionController::TestCase
62
62
  setup do
63
63
  @routes = Rails.application.routes
64
64
  end
65
- include ActiveRecord::TestFixtures
66
65
 
67
- self.fixture_path = "#{Rails.root}/test/fixtures/"
66
+ if defined?(ActiveRecord::Base)
67
+ include ActiveRecord::TestFixtures
68
+
69
+ self.fixture_path = "#{Rails.root}/test/fixtures/"
70
+ end
68
71
  end
69
72
 
70
73
  class ActionDispatch::IntegrationTest
@@ -17,7 +17,7 @@
17
17
  module Test
18
18
  module Unit
19
19
  module Rails
20
- VERSION = "5.0.1"
20
+ VERSION = "5.0.2"
21
21
  end
22
22
  end
23
23
  end
@@ -21,14 +21,6 @@ lib_dir = File.join(base_dir, "lib")
21
21
  test_dir = File.join(base_dir, "test")
22
22
  $LOAD_PATH.unshift(lib_dir)
23
23
 
24
- require "rails/all"
25
-
26
- # For Rack::Builder#to_app
27
- module TestUnitRails
28
- class Application < ::Rails::Application
29
- end
30
- end
31
-
32
24
  require "test-unit"
33
25
 
34
26
  exit Test::Unit::AutoRunner.run(true, test_dir)
@@ -14,7 +14,7 @@
14
14
  # License along with this library; if not, write to the Free Software
15
15
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
- require "test/unit/rails/test_help"
17
+ require "test_helper"
18
18
 
19
19
  class TestActionController < Test::Unit::TestCase
20
20
  # TODO: Remove it and add more meaningful test
@@ -1,4 +1,5 @@
1
1
  # Copyright (C) 2015 Masafumi Yokoyama <yokoyama@clear-code.com>
2
+ # Copyright (C) 2016 Kouhei Sutou <kou@clear-code.com>
2
3
  #
3
4
  # This library is free software; you can redistribute it and/or
4
5
  # modify it under the terms of the GNU Lesser General Public
@@ -14,11 +15,15 @@
14
15
  # License along with this library; if not, write to the Free Software
15
16
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
17
 
17
- require "test/unit/rails/test_help"
18
+ require "test_helper"
18
19
 
19
- class TestActionDispatch < Test::Unit::TestCase
20
- # TODO: Remove it and add more meaningful test
21
- def test_defined
22
- assert_true(ActionDispatch.const_defined?(:IntegrationTest))
20
+ class TestActionDispatch < ActionDispatch::IntegrationTest
21
+ def test_assert_recognizes
22
+ assert_recognizes({
23
+ :controller => "items",
24
+ :action => "show",
25
+ :id => "1",
26
+ },
27
+ "/items/1")
23
28
  end
24
29
  end
@@ -0,0 +1,43 @@
1
+ # Copyright (C) 2016 Kouhei Sutou <yokoyama@clear-code.com>
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ ENV["RAILS_ENV"] = "test"
18
+
19
+ require "rails/all"
20
+
21
+ # For Rack::Builder#to_app
22
+ module TestUnitRails
23
+ class Application < ::Rails::Application
24
+ end
25
+ end
26
+
27
+ require "test/unit/rails/test_help"
28
+
29
+ Rails.application.secrets[:secret_key_base] = 'xxx'
30
+ Rails.application.routes.draw do
31
+ resources :items
32
+ end
33
+
34
+ class ItemsController
35
+ end
36
+
37
+ require "fileutils"
38
+
39
+ db_dir = "tmp"
40
+ FileUtils.rm_rf(db_dir)
41
+ FileUtils.mkdir_p(db_dir)
42
+ ActiveRecord::Base.establish_connection("adapter" => "sqlite3",
43
+ "database" => "#{db_dir}/test.sqlite3")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-unit-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 5.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-27 00:00:00.000000000 Z
11
+ date: 2016-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -150,8 +150,24 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
- description: |
154
- Rails supports Test::Unit bundled in Ruby 1.8 and MiniTest but doesn't support test-unit 2. Rails with test-unit 2 works but is not fully worked.
153
+ - !ruby/object:Gem::Dependency
154
+ name: sqlite3
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ description: 'Rails supports Test::Unit bundled in Ruby 1.8 and MiniTest but doesn''t
168
+ support test-unit 2. Rails with test-unit 2 works but is not fully worked.
169
+
170
+ '
155
171
  email:
156
172
  - kou@clear-code.com
157
173
  executables: []
@@ -172,6 +188,7 @@ files:
172
188
  - test/run-test.rb
173
189
  - test/test_action_controller.rb
174
190
  - test/test_action_dispatch.rb
191
+ - test/test_helper.rb
175
192
  homepage: https://github.com/test-unit/test-unit-rails
176
193
  licenses:
177
194
  - LGPLv2 or later
@@ -192,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
209
  version: '0'
193
210
  requirements: []
194
211
  rubyforge_project:
195
- rubygems_version: 2.4.5.1
212
+ rubygems_version: 2.5.1
196
213
  signing_key:
197
214
  specification_version: 4
198
215
  summary: test-unit-rails is a Rails adapter for test-unit 3. You can use full test-unit
@@ -202,4 +219,5 @@ test_files:
202
219
  - test/test_action_controller.rb
203
220
  - test/run-test.rb
204
221
  - test/test_action_dispatch.rb
222
+ - test/test_helper.rb
205
223
  has_rdoc: