-
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.
Major new direction and testing setup.
- Loading branch information
1 parent
364c113
commit 6d5d3ae
Showing
41 changed files
with
469 additions
and
112 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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
.bundle | ||
Gemfile.lock | ||
pkg/* | ||
*.log |
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 @@ | ||
language: ruby | ||
rvm: | ||
- ree | ||
- 1.8.7 | ||
- 1.9.2 | ||
- 1.9.3 | ||
- jruby-18mode | ||
- jruby-19mode | ||
- rbx-18mode | ||
- rbx-19mode | ||
gemfile: | ||
- gemfiles/rails3.0.x.gemfile | ||
- gemfiles/rails3.1.x.gemfile | ||
- gemfiles/rails3.2.x.gemfile | ||
- gemfiles/rails4.0.x.gemfile |
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
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
source :rubygems | ||
gemspec | ||
eval File.read('gemfiles/rails3.2.x.gemfile') |
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
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 |
---|---|---|
|
@@ -10,4 +10,3 @@ Rake::TestTask.new do |t| | |
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 @@ | ||
source :rubygems | ||
|
||
gemspec :path => File.expand_path('../',__FILE__) | ||
|
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 @@ | ||
eval File.read('gemfiles/common.gemfile') | ||
|
||
gem 'rails', '~> 3.0.0' |
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 @@ | ||
eval File.read('gemfiles/common.gemfile') | ||
|
||
gem 'rails', '~> 3.1.0' |
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 @@ | ||
eval File.read('gemfiles/common.gemfile') | ||
|
||
gem 'rails', '~> 3.2.0' | ||
|
Empty file.
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 |
---|---|---|
@@ -1,4 +1,9 @@ | ||
module MiniTestSpecRails | ||
end | ||
|
||
require 'rails' | ||
require 'minitest/spec' | ||
require 'test/unit/testcase' | ||
require 'minitest-spec-rails/version' | ||
require 'minitest-spec-rails/test_case' | ||
require 'minitest-spec-rails/railtie' | ||
require 'test/unit/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,30 @@ | ||
ActionController::TestCase.instance_eval do | ||
|
||
register_spec_type(self) do |desc| | ||
Class === desc && desc < ActionController::Metal | ||
end | ||
|
||
register_spec_type(/Controller( ?Test)?\z/i, self) | ||
|
||
end | ||
|
||
ActionDispatch::IntegrationTest.instance_eval do | ||
|
||
register_spec_type(/(Acceptance|Integration) ?Test\z/i, self) | ||
|
||
end | ||
|
||
# class ActionController::TestCase | ||
# def self.determine_default_controller_class(name) | ||
# if name.match(/.*(?:^|::)(\w+Controller)/) | ||
# $1.constantize rescue nil | ||
# else | ||
# super(name) | ||
# end | ||
# end | ||
# before { setup_controller_request_and_response } | ||
# end | ||
|
||
# class ActionController::IntegrationTest | ||
# before { self.class.app = Rails.application } | ||
# 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 @@ | ||
ActionMailer::TestCase.instance_eval do | ||
|
||
register_spec_type(self) do |desc| | ||
Class === desc && desc < ActionMailer::Base | ||
end | ||
|
||
register_spec_type(/Mailer( ?Test)?\z/i, self) | ||
|
||
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,5 @@ | ||
ActionView::TestCase.instance_eval do | ||
|
||
register_spec_type(/(Helper|View)( ?Test)?\z/i, self) | ||
|
||
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,11 @@ | ||
ActiveSupport::TestCase.instance_eval do | ||
|
||
class << self | ||
remove_method :describe | ||
end | ||
|
||
register_spec_type(self) do |desc| | ||
Class === desc && desc < ActiveRecord::Base | ||
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,17 @@ | ||
module MiniTestSpecRails | ||
class Railtie < ::Rails::Railtie | ||
|
||
config.minitest_spec_rails = ActiveSupport::OrderedOptions.new | ||
|
||
config.before_initialize do |app| | ||
ActiveSupport.on_load(:action_view) { require 'minitest-spec-rails/init/action_view' } | ||
ActiveSupport.on_load(:action_controller) { require 'minitest-spec-rails/init/action_controller' } | ||
ActiveSupport.on_load(:action_mailer) { require 'minitest-spec-rails/init/action_mailer' } | ||
end | ||
|
||
initializer 'minitest-spec-rails.after.load_active_support', :after => :load_active_support, :group => :all do |app| | ||
require 'minitest-spec-rails/init/active_support' | ||
end | ||
|
||
end | ||
end |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module MiniTestSpecRails | ||
VERSION = "3.0.7" | ||
VERSION = "4.3.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 |
---|---|---|
@@ -1,9 +1,5 @@ | ||
require 'minitest/autorun' | ||
require 'test/unit/assertions' | ||
require 'test/unit/testcase' | ||
|
||
module Test | ||
module Unit | ||
|
||
TEST_UNIT_IMPLEMENTATION = 'test/unit mock using minitest-spec-rails' | ||
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
require 'minitest/spec' | ||
|
||
module Test | ||
module Unit | ||
Assertions = ::MiniTest::Assertions | ||
|
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
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 |
---|---|---|
|
@@ -2,20 +2,23 @@ | |
$:.push File.expand_path("../lib", __FILE__) | ||
require "minitest-spec-rails/version" | ||
|
||
Gem::Specification.new do |s| | ||
s.name = 'minitest-spec-rails' | ||
s.version = MiniTestSpecRails::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 = 'Drop in MiniTest::Spec support for Rails 3.x' | ||
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.1' | ||
s.add_runtime_dependency 'rails', '~> 3.0' | ||
s.add_development_dependency 'rake' | ||
Gem::Specification.new do |gem| | ||
gem.name = 'minitest-spec-rails' | ||
gem.version = MiniTestSpecRails::VERSION | ||
gem.platform = Gem::Platform::RUBY | ||
gem.authors = ['Ken Collins'] | ||
gem.email = ['[email protected]'] | ||
gem.homepage = 'http:https://github.com/metaskills/minitest-spec-rails' | ||
gem.summary = 'Drop in MiniTest::Spec support for Rails 3 or 4.' | ||
gem.description = 'Force ActiveSupport::TestCase to subclass MiniTest::Spec for a drop in behavior change.' | ||
gem.files = `git ls-files`.split("\n") | ||
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") | ||
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } | ||
gem.require_paths = ['lib'] | ||
gem.add_runtime_dependency 'minitest', '~> 4.3' | ||
gem.add_runtime_dependency 'rails', '>= 3.0' | ||
gem.add_development_dependency 'minitest-emoji' | ||
gem.add_development_dependency 'pry' | ||
gem.add_development_dependency 'rake' | ||
gem.add_development_dependency 'sqlite3' | ||
end |
Oops, something went wrong.