-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2f6f1b1
Showing
12 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.gem | ||
.bundle | ||
Gemfile.lock | ||
pkg/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
source :rubygems | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Copyright (c) 2011 Ken Collins, <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person | ||
obtaining a copy of this software and associated documentation | ||
files (the "Software"), to deal in the Software without | ||
restriction, including without limitation the rights to use, | ||
copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the | ||
Software is furnished to do so, subject to the following | ||
conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
= MiniTest::Spec For Rails | ||
|
||
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: | ||
|
||
http:https://metaskills.net/2011/03/26/using-minitest-spec-with-rails/ | ||
|
||
|
||
= Code | ||
|
||
* http:https://github.com/metaskills/minitest-spec-rails | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require 'bundler' | ||
require 'rake/testtask' | ||
|
||
Bundler::GemHelper.install_tasks | ||
|
||
Rake::TestTask.new do |t| | ||
t.libs = ['lib','test'] | ||
t.test_files = Dir.glob("test/**/*_test.rb").sort | ||
t.verbose = true | ||
end | ||
|
||
task :default => [:test] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
require 'minitest/spec' | ||
require 'test/unit/testcase' | ||
require 'minitest-spec-rails/version' | ||
require 'minitest-spec-rails/test_case' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class << ActiveSupport::TestCase | ||
remove_method :describe | ||
end if defined?(ActiveSupport::TestCase) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module MiniSpecUnit | ||
VERSION = "0.4.0" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'minitest/autorun' | ||
require 'test/unit/assertions' | ||
require 'test/unit/testcase' | ||
|
||
module Test | ||
module Unit | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require 'minitest/spec' | ||
|
||
module Test | ||
module Unit | ||
Assertions = ::MiniTest::Assertions | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
require 'minitest/spec' | ||
require 'test/unit/assertions' | ||
require 'pp' | ||
|
||
module Test | ||
module Unit | ||
class TestCase < ::MiniTest::Spec | ||
|
||
MINI_SPECUNIT = true | ||
|
||
def mu_pp(obj) | ||
obj.pretty_inspect.chomp | ||
end | ||
|
||
def build_message(head, template=nil, *arguments) | ||
template &&= template.chomp | ||
template.gsub(/\?/) { mu_pp(arguments.shift) } | ||
end | ||
|
||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- encoding: utf-8 -*- | ||
$:.push File.expand_path("../lib", __FILE__) | ||
require "minitest-spec-rails/version" | ||
|
||
Gem::Specification.new do |s| | ||
s.name = 'minitest-spec-rails' | ||
s.version = MiniSpecUnit::VERSION | ||
s.platform = Gem::Platform::RUBY | ||
s.authors = ['Ken Collins'] | ||
s.email = ['[email protected]'] | ||
s.homepage = 'http:https://github.com/metaskills/minitest-spec-rails' | ||
s.summary = 'Make Test::Unit::TestCase a subclass of of MiniTest::Spec.' | ||
s.description = 'Force ActiveSupport::TestCase to subclass MiniTest::Spec for a drop in behavior change.' | ||
s.files = `git ls-files`.split("\n") | ||
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") | ||
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } | ||
s.require_paths = ['lib'] | ||
s.add_runtime_dependency 'minitest', '~> 2.11' | ||
s.add_development_dependency 'rake' | ||
end |