minitest-spec-rails 3.0.0

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.
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source :rubygems
2
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2011 Ken Collins, <ken@metaskills.net>
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,15 @@
1
+
2
+ = MiniTest::Spec For Rails
3
+
4
+ Make Test::Unit::TestCase a subclass of of MiniTest::Spec with this simple shim. Tricks ActiveSupport::TestCase to use MiniTest::Spec instead. Includes any monkey patches to make using MiniTest::Spec a drop in behavior change for any Rails 3 project. Full Details here:
5
+
6
+ http://metaskills.net/2011/03/26/using-minitest-spec-with-rails/
7
+
8
+
9
+ = Code
10
+
11
+ * http://github.com/metaskills/minitest-spec-rails
12
+
13
+
14
+
15
+
@@ -0,0 +1,13 @@
1
+ require 'bundler'
2
+ require 'rake/testtask'
3
+
4
+ Bundler::GemHelper.install_tasks
5
+
6
+ Rake::TestTask.new do |t|
7
+ t.libs = ['lib','test']
8
+ t.test_files = Dir.glob("test/**/*_test.rb").sort
9
+ t.verbose = true
10
+ end
11
+
12
+ task :default => [:test]
13
+
@@ -0,0 +1,4 @@
1
+ require 'minitest/spec'
2
+ require 'test/unit/testcase'
3
+ require 'minitest-spec-rails/version'
4
+ require 'minitest-spec-rails/test_case'
@@ -0,0 +1,3 @@
1
+ class << ActiveSupport::TestCase
2
+ remove_method :describe
3
+ end if defined?(ActiveSupport::TestCase)
@@ -0,0 +1,3 @@
1
+ module MiniTestSpecRails
2
+ VERSION = "3.0.0"
3
+ end
@@ -0,0 +1,9 @@
1
+ require 'minitest/autorun'
2
+ require 'test/unit/assertions'
3
+ require 'test/unit/testcase'
4
+
5
+ module Test
6
+ module Unit
7
+
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ require 'minitest/spec'
2
+
3
+ module Test
4
+ module Unit
5
+ Assertions = ::MiniTest::Assertions
6
+ end
7
+ end
@@ -0,0 +1,23 @@
1
+ require 'minitest/spec'
2
+ require 'test/unit/assertions'
3
+ require 'pp'
4
+
5
+ module Test
6
+ module Unit
7
+ class TestCase < ::MiniTest::Spec
8
+
9
+ MINI_SPECUNIT = true
10
+
11
+ def mu_pp(obj)
12
+ obj.pretty_inspect.chomp
13
+ end
14
+
15
+ def build_message(head, template=nil, *arguments)
16
+ template &&= template.chomp
17
+ template.gsub(/\?/) { mu_pp(arguments.shift) }
18
+ end
19
+
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "minitest-spec-rails/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = 'minitest-spec-rails'
7
+ s.version = MiniTestSpecRails::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ['Ken Collins']
10
+ s.email = ['ken@metaskills.net']
11
+ s.homepage = 'http://github.com/metaskills/minitest-spec-rails'
12
+ s.summary = 'Drop in MiniTest::Spec support for Rails 3.'
13
+ s.description = 'Force ActiveSupport::TestCase to subclass MiniTest::Spec for a drop in behavior change.'
14
+ s.files = `git ls-files`.split("\n")
15
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
+ s.require_paths = ['lib']
18
+ s.add_runtime_dependency 'minitest', '~> 2.11'
19
+ s.add_development_dependency 'rake'
20
+ end
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: minitest-spec-rails
3
+ version: !ruby/object:Gem::Version
4
+ hash: 7
5
+ prerelease:
6
+ segments:
7
+ - 3
8
+ - 0
9
+ - 0
10
+ version: 3.0.0
11
+ platform: ruby
12
+ authors:
13
+ - Ken Collins
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2012-03-27 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: minitest
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ hash: 21
29
+ segments:
30
+ - 2
31
+ - 11
32
+ version: "2.11"
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: rake
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
47
+ type: :development
48
+ version_requirements: *id002
49
+ description: Force ActiveSupport::TestCase to subclass MiniTest::Spec for a drop in behavior change.
50
+ email:
51
+ - ken@metaskills.net
52
+ executables: []
53
+
54
+ extensions: []
55
+
56
+ extra_rdoc_files: []
57
+
58
+ files:
59
+ - .gitignore
60
+ - Gemfile
61
+ - MIT-LICENSE
62
+ - README.rdoc
63
+ - Rakefile
64
+ - lib/minitest-spec-rails.rb
65
+ - lib/minitest-spec-rails/test_case.rb
66
+ - lib/minitest-spec-rails/version.rb
67
+ - lib/test/unit.rb
68
+ - lib/test/unit/assertions.rb
69
+ - lib/test/unit/testcase.rb
70
+ - minitest-spec-rails.gemspec
71
+ homepage: http://github.com/metaskills/minitest-spec-rails
72
+ licenses: []
73
+
74
+ post_install_message:
75
+ rdoc_options: []
76
+
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ none: false
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ hash: 3
85
+ segments:
86
+ - 0
87
+ version: "0"
88
+ required_rubygems_version: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ hash: 3
94
+ segments:
95
+ - 0
96
+ version: "0"
97
+ requirements: []
98
+
99
+ rubyforge_project:
100
+ rubygems_version: 1.8.17
101
+ signing_key:
102
+ specification_version: 3
103
+ summary: Drop in MiniTest::Spec support for Rails 3.
104
+ test_files: []
105
+