test-unit-activesupport 1.0.2 → 1.0.3

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: 32d7151b660f11972ef069ffe92d2de51f770b27
4
- data.tar.gz: daa4388ce4ea46d9a9c2c7cee4195a1aa109f9f1
3
+ metadata.gz: 58c8b794162d8c26c21f4e5702f5b026e8dfd973
4
+ data.tar.gz: 5cb2acc74181c30775006b54658d380d243ec64c
5
5
  SHA512:
6
- metadata.gz: d4798982fca754939687ba13a1aa22f15f46f22981783d3828f15bf176d2bcbc48855be4b88ea18a540995b405a858079959178fa00a2d9a5864b0351c83c596
7
- data.tar.gz: 7ced378b15ccdb7e670a6039896828a200959a0fd59d67a964ff9406acd4863e74b2ca5afd340d3ec99f53d6efd2911d210ac52af786a2de9f62dde2351b1da3
6
+ metadata.gz: 314c7eacac425849f55959eb2e0f3ae9eb653fd3cb70ea7144125ece69ff7fa9122acc67669fae1a0f9d43966610cb53e0b8916abc2165fecba21d48539636ca
7
+ data.tar.gz: 2fd3f7ba4a4ec11a01a9d2df3235d99ae5a2608fdacb466bb05d2045d7f196caadd4c8b8b77ab6fca418cc3892b09e8864d4fb2ce0e0cd5c9791a18b36c93779
data/README.textile CHANGED
@@ -1,5 +1,7 @@
1
1
  h1. test-unit-activesupport
2
2
 
3
+ !https://travis-ci.org/test-unit/test-unit-activesupport.svg?branch=master!:https://travis-ci.org/test-unit/test-unit-activesupport
4
+
3
5
  "Web site":https://test-unit.github.io/#test-unit-activesupport
4
6
 
5
7
  h2. Description
@@ -8,7 +10,7 @@ test-unit-activesupport is an ActiveSupport adapter for test-unit 3. You can use
8
10
 
9
11
  h2. Install
10
12
 
11
- Require @test/unit/active_support@ before using ActiveSupport:
13
+ Require @test/unit/active_support@:
12
14
 
13
15
  <pre>require "test/unit/active_support"
14
16
  require "active_support"
@@ -16,8 +18,8 @@ require "active_support"
16
18
 
17
19
  Now you can use full test-unit 3.x features with ActiveSupport.
18
20
 
19
- <pre>require 'test/unit/active_support'
20
- # require "active_support" ...
21
+ <pre>require "test/unit/active_support"
22
+ require "active_support"
21
23
 
22
24
  class YourTest < ActiveSupport::TestCase
23
25
  # ...
@@ -38,3 +40,4 @@ h2. Authors
38
40
  h2. Thanks
39
41
 
40
42
  * Michael Grosser
43
+ * Shinta Koyanagi
data/Rakefile CHANGED
@@ -21,9 +21,11 @@ require "./lib/test/unit/active_support/version"
21
21
  require "rubygems"
22
22
  require "rubygems/package_task"
23
23
  require "yard"
24
- require 'bundler/gem_helper'
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
@@ -1,5 +1,21 @@
1
1
  h1. News
2
2
 
3
+ h2(#1-0-3). 1.0.3 - 2015-02-03
4
+
5
+ Bug fix release.
6
+
7
+ h3. Fixes
8
+
9
+ * Supported below missing assertions from @ActiveSupport::Testing::Assertions@.
10
+ [GitHub#4][Patch by Shinta Koyanagi]
11
+ ** @assert_not@
12
+ ** @assert_difference@
13
+ ** @assert_no_difference@
14
+
15
+ h3. Thanks
16
+
17
+ * Shinta Koyanagi
18
+
3
19
  h2(#1-0-2). 1.0.2 - 2014-09-04
4
20
 
5
21
  ActiveSupport 4.0.0 support improved release.
@@ -19,7 +19,7 @@
19
19
  module Test
20
20
  module Unit
21
21
  module ActiveSupport
22
- VERSION = "1.0.2"
22
+ VERSION = "1.0.3"
23
23
  end
24
24
  end
25
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-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
@@ -17,11 +17,19 @@
17
17
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
18
 
19
19
  require "test-unit"
20
- require "test/unit/assertion-failed-error"
20
+ require "active_support/testing/assertions"
21
21
 
22
22
  module ActiveSupport
23
- remove_const :TestCase
23
+ if const_defined?(:TestCase)
24
+ remove_const :TestCase
25
+ end
26
+
24
27
  class TestCase < ::Test::Unit::TestCase
25
- Assertion = ::Test::Unit::AssertionFailedError
28
+ include ActiveSupport::Testing::Assertions
29
+
30
+ private
31
+ def mu_pp(object)
32
+ AssertionMessage.convert(object)
33
+ end
26
34
  end
27
35
  end
data/test/run-test.rb ADDED
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Copyright (C) 2015 Kouhei Sutou <kou@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("..")
20
+ lib_dir = File.join(base_dir)
21
+ $LOAD_PATH.unshift(lib_dir)
22
+
23
+ require "test/unit/active_support"
24
+
25
+ exit(Test::Unit::AutoRunner.run(true))
@@ -0,0 +1,34 @@
1
+ # Copyright (C) 2015 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
+ class TestAssertions < ActiveSupport::TestCase
18
+ test "assert_not" do
19
+ assert_not(false)
20
+ end
21
+
22
+ test "assert_difference" do
23
+ x = 1
24
+ assert_difference("x", 1) do
25
+ x += 1
26
+ end
27
+ end
28
+
29
+ test "assert_no_difference" do
30
+ x = 1
31
+ assert_no_difference("x") do
32
+ end
33
+ end
34
+ 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.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-04 00:00:00.000000000 Z
11
+ date: 2015-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -122,6 +122,8 @@ files:
122
122
  - doc/text/news.textile
123
123
  - lib/test/unit/active_support.rb
124
124
  - lib/test/unit/active_support/version.rb
125
+ - test/run-test.rb
126
+ - test/test_assertions.rb
125
127
  homepage: https://github.com/test-unit/test-unit-activesupport
126
128
  licenses:
127
129
  - LGPLv2 or later
@@ -147,5 +149,7 @@ signing_key:
147
149
  specification_version: 4
148
150
  summary: test-unit-activesupport is an ActiveSupport adapter for test-unit 3. You
149
151
  can use full test-unit 3 features with @ActiveSupport::TestCase@.
150
- test_files: []
152
+ test_files:
153
+ - test/run-test.rb
154
+ - test/test_assertions.rb
151
155
  has_rdoc: