test-unit-rails 1.0.4 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +7 -0
- data/doc/text/news.textile +14 -0
- data/lib/rails/commands/test.rb +26 -0
- data/lib/test/unit/rails.rb +1 -5
- data/lib/test/unit/rails/railtie.rb +25 -0
- data/lib/test/unit/rails/test_help.rb +10 -8
- data/lib/test/unit/rails/version.rb +2 -4
- data/test/run-test.rb +34 -0
- data/test/test_action_controller.rb +24 -0
- data/test/test_action_dispatch.rb +24 -0
- metadata +32 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 558d3158c1c36145034433f536b302f2422f109f
|
4
|
+
data.tar.gz: 89011c611a7a1c04817c914b0528dd06846e2b01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e955f5a78c9886ae8d554e03b44f6cfb691fa552673721526319a77842d2ee77f39aeb891f4920f0211adf7abee9fd9796b7ccea2405a1bab2eea13d85abb6ef
|
7
|
+
data.tar.gz: 3f594711884f14b2b2cb983d9624f12c8ac3d0756980aac7ea764f6eefbcb92b6ae3a832ba9c15fcb22ba8f70a4b221179d1ee2ae70cac25a5f782b224285de9
|
data/Rakefile
CHANGED
@@ -24,6 +24,8 @@ require 'yard'
|
|
24
24
|
require 'bundler/gem_helper'
|
25
25
|
require 'packnga'
|
26
26
|
|
27
|
+
task :default => :test
|
28
|
+
|
27
29
|
base_dir = File.join(File.dirname(__FILE__))
|
28
30
|
|
29
31
|
class Bundler::GemHelper
|
@@ -47,3 +49,8 @@ end
|
|
47
49
|
|
48
50
|
Packnga::ReleaseTask.new(spec) do |task|
|
49
51
|
end
|
52
|
+
|
53
|
+
desc "Run test"
|
54
|
+
task :test do
|
55
|
+
ruby("test/run-test.rb")
|
56
|
+
end
|
data/doc/text/news.textile
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
h1. News
|
2
2
|
|
3
|
+
h2(#5-0-0). 5.0.0 - 2016-01-18
|
4
|
+
|
5
|
+
Rails 5 support release.
|
6
|
+
|
7
|
+
h2. Improvements
|
8
|
+
|
9
|
+
* Supported Rails 5.
|
10
|
+
* Required Rails 4 or later explicitly.
|
11
|
+
[GitHub#5][Patch by Charles Lowell]
|
12
|
+
|
13
|
+
h2. Thanks
|
14
|
+
|
15
|
+
* Charles Lowell
|
16
|
+
|
3
17
|
h2(#1-0-4). 1.0.4 - 2014-09-07
|
4
18
|
|
5
19
|
Bug fixes release.
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Copyright (C) 2016 Kouhei Sutou <kou@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
|
+
require "test/unit/autorunner"
|
18
|
+
|
19
|
+
if defined?(ENGINE_ROOT)
|
20
|
+
$LOAD_PATH << File.expand_path("test", ENGINE_ROOT)
|
21
|
+
else
|
22
|
+
$LOAD_PATH << File.expand_path("../../test", APP_PATH)
|
23
|
+
end
|
24
|
+
|
25
|
+
ARGV.unshift("--default-test-path=test")
|
26
|
+
exit(Test::Unit::AutoRunner.run(true))
|
data/lib/test/unit/rails.rb
CHANGED
@@ -17,8 +17,4 @@
|
|
17
17
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
18
|
|
19
19
|
require "test/unit/rails/version"
|
20
|
-
|
21
|
-
require "test/unit/active_support"
|
22
|
-
require "test/unit/notify"
|
23
|
-
require "test/unit/rr"
|
24
|
-
require "test/unit/capybara"
|
20
|
+
require "test/unit/rails/railtie"
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Copyright (C) 2016 Kouhei Sutou <kou@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
|
+
module TestUnitRails
|
18
|
+
class TestUnitRailtie < Rails::Railtie
|
19
|
+
rake_tasks do
|
20
|
+
unless defined?(Rails::TestTask)
|
21
|
+
load "test/unit/rails/testing.rake"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
#
|
3
|
-
# Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
|
3
|
+
# Copyright (C) 2012-2016 Kouhei Sutou <kou@clear-code.com>
|
4
4
|
#
|
5
5
|
# This library is free software; you can redistribute it and/or
|
6
6
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -16,20 +16,22 @@
|
|
16
16
|
# License along with this library; if not, write to the Free Software
|
17
17
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
18
|
|
19
|
-
|
20
19
|
if Rails.env.production?
|
21
20
|
abort("Abort testing: Your Rails environment is running in production mode!")
|
22
21
|
end
|
23
22
|
|
24
|
-
require "test
|
23
|
+
require "test/unit/active_support"
|
24
|
+
require "test/unit/notify"
|
25
|
+
require "test/unit/rr"
|
26
|
+
require "test/unit/capybara"
|
27
|
+
|
25
28
|
require "test/unit/assertion-failed-error"
|
26
29
|
|
27
|
-
require "test/unit/rails"
|
28
30
|
require "capybara/rails"
|
29
|
-
require
|
30
|
-
require
|
31
|
-
require
|
32
|
-
require
|
31
|
+
require "active_support/testing/constant_lookup"
|
32
|
+
require "action_controller"
|
33
|
+
require "action_controller/test_case"
|
34
|
+
require "action_dispatch/testing/integration"
|
33
35
|
|
34
36
|
if defined?(ActiveRecord::Migration)
|
35
37
|
if ActiveRecord::Migration.respond_to?(:maintain_test_schema!)
|
@@ -1,6 +1,4 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
# Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
|
1
|
+
# Copyright (C) 2012-2016 Kouhei Sutou <kou@clear-code.com>
|
4
2
|
#
|
5
3
|
# This library is free software; you can redistribute it and/or
|
6
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -19,7 +17,7 @@
|
|
19
17
|
module Test
|
20
18
|
module Unit
|
21
19
|
module Rails
|
22
|
-
VERSION = "
|
20
|
+
VERSION = "5.0.0"
|
23
21
|
end
|
24
22
|
end
|
25
23
|
end
|
data/test/run-test.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Copyright (C) 2015 Masafumi Yokoyama <yokoyama@clear-code.com>
|
4
|
+
#
|
5
|
+
# This library is free software; you can redistribute it and/or
|
6
|
+
# modify it under the terms of the GNU Lesser General Public
|
7
|
+
# License as published by the Free Software Foundation; either
|
8
|
+
# version 2.1 of the License, or (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This library is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public
|
16
|
+
# License along with this library; if not, write to the Free Software
|
17
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
|
19
|
+
base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
20
|
+
lib_dir = File.join(base_dir, "lib")
|
21
|
+
test_dir = File.join(base_dir, "test")
|
22
|
+
$LOAD_PATH.unshift(lib_dir)
|
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
|
+
require "test-unit"
|
33
|
+
|
34
|
+
exit Test::Unit::AutoRunner.run(true, test_dir)
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Copyright (C) 2015 Masafumi Yokoyama <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
|
+
require "test/unit/rails/test_help"
|
18
|
+
|
19
|
+
class TestActionController < Test::Unit::TestCase
|
20
|
+
# TODO: Remove it and add more meaningful test
|
21
|
+
def test_defined
|
22
|
+
assert_true(ActionController.const_defined?(:TestCase))
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Copyright (C) 2015 Masafumi Yokoyama <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
|
+
require "test/unit/rails/test_help"
|
18
|
+
|
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))
|
23
|
+
end
|
24
|
+
end
|
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:
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 4.0.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 4.0.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: test-unit-activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,28 +58,42 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 1.0.5
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 1.0.5
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: test-unit-rr
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 1.0.4
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 1.0.4
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: test-unit
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 3.1.7
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 3.1.7
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: bundler
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -149,9 +163,14 @@ files:
|
|
149
163
|
- README.textile
|
150
164
|
- Rakefile
|
151
165
|
- doc/text/news.textile
|
166
|
+
- lib/rails/commands/test.rb
|
152
167
|
- lib/test/unit/rails.rb
|
168
|
+
- lib/test/unit/rails/railtie.rb
|
153
169
|
- lib/test/unit/rails/test_help.rb
|
154
170
|
- lib/test/unit/rails/version.rb
|
171
|
+
- test/run-test.rb
|
172
|
+
- test/test_action_controller.rb
|
173
|
+
- test/test_action_dispatch.rb
|
155
174
|
homepage: https://github.com/test-unit/test-unit-rails
|
156
175
|
licenses:
|
157
176
|
- LGPLv2 or later
|
@@ -172,11 +191,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
191
|
version: '0'
|
173
192
|
requirements: []
|
174
193
|
rubyforge_project:
|
175
|
-
rubygems_version: 2.
|
194
|
+
rubygems_version: 2.4.5.1
|
176
195
|
signing_key:
|
177
196
|
specification_version: 4
|
178
197
|
summary: test-unit-rails is a Rails adapter for test-unit 3. You can use full test-unit
|
179
198
|
3 features, "RR":https://rubygems.org/gems/rr integration and "Capybara":https://rubygems.org/gems/capybara
|
180
199
|
integration with test-unit-rails.
|
181
|
-
test_files:
|
200
|
+
test_files:
|
201
|
+
- test/test_action_controller.rb
|
202
|
+
- test/run-test.rb
|
203
|
+
- test/test_action_dispatch.rb
|
182
204
|
has_rdoc:
|