test-unit-activesupport 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/doc/text/news.md +13 -0
- data/lib/test/unit/active_support.rb +20 -0
- data/lib/test/unit/active_support/version.rb +2 -2
- data/test/test_assertions.rb +8 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76fb392d0238c623f18a187ed1779e46cfb2ca26
|
4
|
+
data.tar.gz: 17d9425e51a78253b654527a3ff110523c049081
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 255b406c89dd43c9cfc39b862222f93bd90d775eb2e4150152c511a1c54980899c1459296985ab4a4f9693b4b41268fe8490bcc46b257a33bd665bf1a8e89539
|
7
|
+
data.tar.gz: 2c1cce5ddf7b9a478a79e10e358cfaada44c77de54b8f908e47a1e3a6a5d3487ebd4e77d9458c511c04d83894bac20979dbf3a53b84760cffed3314b66afb688
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
## 1.0.5 - 2016-03-05 {#1-0-5}
|
4
|
+
|
5
|
+
Action Dispatch support fix release.
|
6
|
+
|
7
|
+
### Improvements
|
8
|
+
|
9
|
+
* Supported Action Dispatch.
|
10
|
+
[GitHub#10][Patch by Philip Müller]
|
11
|
+
|
12
|
+
### Thanks
|
13
|
+
|
14
|
+
* Philip Müller
|
15
|
+
|
3
16
|
## 1.0.4 - 2015-08-28 {#1-0-4}
|
4
17
|
|
5
18
|
Action Mailer support fix release.
|
@@ -38,6 +38,26 @@ module ActiveSupport
|
|
38
38
|
class TestCase < ::Test::Unit::TestCase
|
39
39
|
include ActiveSupport::Testing::Assertions
|
40
40
|
|
41
|
+
# shoulda needs ActiveSupport::TestCase::Assertion, which is not
|
42
|
+
# set in test-unit 3
|
43
|
+
Assertion = Test::Unit::AssertionFailedError
|
44
|
+
|
45
|
+
# rails 4.1 (action dispatch assertions) needs the 'message'
|
46
|
+
# method which is not defined in test-unit 3
|
47
|
+
def message(msg=nil, ending=nil, &default)
|
48
|
+
lambda do
|
49
|
+
msg = msg.call if msg.respond_to?(:call)
|
50
|
+
msg = msg.to_s.chomp(".") unless msg.nil?
|
51
|
+
if msg.nil? or msg.empty?
|
52
|
+
custom_message = ""
|
53
|
+
else
|
54
|
+
custom_message = "#{msg}.\n"
|
55
|
+
end
|
56
|
+
ending ||= "."
|
57
|
+
"#{custom_message}#{default.call}#{ending}"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
41
61
|
private
|
42
62
|
def mu_pp(object)
|
43
63
|
AssertionMessage.convert(object)
|
@@ -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-2015 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
|
@@ -19,7 +19,7 @@
|
|
19
19
|
module Test
|
20
20
|
module Unit
|
21
21
|
module ActiveSupport
|
22
|
-
VERSION = "1.0.
|
22
|
+
VERSION = "1.0.5"
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
data/test/test_assertions.rb
CHANGED
@@ -31,4 +31,12 @@ class TestAssertions < ActiveSupport::TestCase
|
|
31
31
|
assert_no_difference("x") do
|
32
32
|
end
|
33
33
|
end
|
34
|
+
|
35
|
+
test "message method" do
|
36
|
+
delayed_message = message("test", "bernd") do
|
37
|
+
"hans"
|
38
|
+
end
|
39
|
+
|
40
|
+
assert_equal("test.\nhansbernd", delayed_message.call)
|
41
|
+
end
|
34
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test-unit-activesupport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
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-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -126,7 +126,7 @@ files:
|
|
126
126
|
- test/test_assertions.rb
|
127
127
|
homepage: https://github.com/test-unit/test-unit-activesupport
|
128
128
|
licenses:
|
129
|
-
-
|
129
|
+
- LGPL-2.1
|
130
130
|
metadata: {}
|
131
131
|
post_install_message:
|
132
132
|
rdoc_options: []
|
@@ -144,12 +144,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
144
|
version: '0'
|
145
145
|
requirements: []
|
146
146
|
rubyforge_project:
|
147
|
-
rubygems_version: 2.
|
147
|
+
rubygems_version: 2.5.1
|
148
148
|
signing_key:
|
149
149
|
specification_version: 4
|
150
150
|
summary: test-unit-activesupport is an ActiveSupport adapter for test-unit 3. You
|
151
151
|
can use full test-unit 3 features with `ActiveSupport::TestCase`.
|
152
152
|
test_files:
|
153
|
-
- test/run-test.rb
|
154
153
|
- test/test_assertions.rb
|
154
|
+
- test/run-test.rb
|
155
155
|
has_rdoc:
|