minitest-rails 2.0.0.beta1 → 2.0.0

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: 543f2ffff937a22e784c7a03b5967fd727e70339
4
- data.tar.gz: ad2b3ab73a693afb6d2fb8be571fd5e7eb0eff76
3
+ metadata.gz: d3100bb4f8f43829d4b0aeef056d6cf66e4290af
4
+ data.tar.gz: 22e53699768ec3403abc5e4aa62f9634d4abd3fb
5
5
  SHA512:
6
- metadata.gz: 3a4951af77f19642c0b6a43f9fc9069ca1f68ccc1c2b34698b00e7bd1c920f62f3473dc2c85f5503057d08ededbfd919980879af76abefc35d39b70a48918fc8
7
- data.tar.gz: 23bffd3475c5e31fc5e9adef9582ff9abcf2521f67849f17ede001ca7a4afc0302d7d4deb2d5ef144949b8fd69bba36a96946283deb654f813223fe0cd588347
6
+ metadata.gz: 5836b46c9bfd99b8a471ff4f828f902c2087e7dca1b342cb5eccd0a6fea435e293665e6478ec8a86eac5874876cc19afcbdb02e767283210ae45729893e1bfc3
7
+ data.tar.gz: 86f605ca671a8435fb6a4fcd5f1da75dcdfaa9a2aa88052e4bdc0aaff5b7966c77510a26c8f8dd32c36d63a7310272f80c29c808d644f8d23c16542e324a4722
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,41 @@
1
+ === 2.0.0 / 2014-04-21
2
+
3
+ Major release, specific to Rails 4.1+ and Minitest 5.
4
+
5
+ * Support additional descriptions in spec types
6
+ * describe PlainOldRubyObject, :model do
7
+ * describe "Users can do things", :integration do
8
+ * Support Generators in default config
9
+ * No longer need to require "minitest/rails/generators" in your test_helper.rb
10
+ * Removed <tt>minitest</tt> rake tasks
11
+ * Code is cleaner now that older Rubies and Rails are no longer supported
12
+
13
+ https://github.com/blowmage/minitest-rails/compare/v1.0.0...v2.0.0
14
+
15
+ === 1.0.1 / 2014-04-15
16
+
17
+ * Add missing module_namespacing to Helper spec
18
+
19
+ https://github.com/blowmage/minitest-rails/compare/v1.0.0...v1.0.1
20
+
21
+ === 1.0.0 / 2014-04-14
22
+
23
+ Yay! A 1.0.0 release, finally!
24
+
25
+ * New rake tasks
26
+ * rake minitest:quick - Runs default tests without DB prep
27
+ * rake minitest:all - Runs all test
28
+ * rake minitest:all:quick - Runs all tests without DB prep
29
+ * Add 'test' rake tasks if not already defined
30
+ * Set the MT_RAILS_NO_AUTORUN flag to stop autorun from being called
31
+ * Useful for integrating with zeus or other app loaders
32
+ * Support Minitest 5's API
33
+ * Allow use of Minitest::Test instead of MiniTest::Unit::TestCase
34
+ * Add AS::TC assertions and expectations
35
+ * Add MT_RAILS_NO_AUTORUN flag
36
+
37
+ https://github.com/blowmage/minitest-rails/compare/v0.9.2...v1.0.0
38
+
1
39
  === 0.9.2 / 2013-04-05
2
40
 
3
41
  * Fix nested describes in ruby 1.8
data/Manifest.txt CHANGED
@@ -44,9 +44,6 @@ lib/minitest/rails/assertions.rb
44
44
  lib/minitest/rails/constant_lookup.rb
45
45
  lib/minitest/rails/expectations.rb
46
46
  lib/minitest/rails/railtie.rb
47
- lib/minitest/rails/tasks/.document
48
- lib/minitest/rails/tasks/minitest.rake
49
- lib/minitest/rails/tasks/sub_test_task.rb
50
47
  lib/minitest/rails/testing.rb
51
48
  lib/minitest/rails/version.rb
52
49
  minitest-rails.gemspec
data/README.rdoc CHANGED
@@ -55,17 +55,23 @@ You can also set these as defaults by adding the following to the <tt>config/app
55
55
  g.test_framework :minitest, spec: true, fixture: false
56
56
  end
57
57
 
58
- To run your tests, minitest-rails provides multiple rake tasks by default, for a complete list, simply run <tt>rake -T</tt>.
58
+ == Running Tests
59
59
 
60
- You can also add any directories under <tt>test/</tt> and minitest-rails will automatically create the associated rake task for it. So let say you add a <tt>test/api/</tt> directory, <tt>rake minitest:api</tt> will automagically be available.
60
+ To run your tests use the <tt>rake test</tt> that ship with rails. For a complete list run <tt>rake -T</tt>.
61
61
 
62
- If you want to automatically run <tt>rake minitest:api</tt> when you call <tt>rake minitest</tt>, add this line to a new .rake file under <tt>lib/tasks/</tt>:
62
+ To add additional testing tasks, define them in your <tt>Rakefile</tt> or a file in <tt>lib/tasks</tt> like so:
63
63
 
64
- Minitest::Rails::Testing.default_tasks << 'api'
64
+ Rails::TestTask.new("test:presenters" => "test:prepare") do |t|
65
+ t.pattern = "test/presenters/**/*_test.rb"
66
+ end
67
+
68
+ If you want your new task to be run when you run <tt>rake test</tt>, also add the following:
69
+
70
+ Rake::Task["test:run"].enhance ["test:presenters"]
65
71
 
66
72
  == Using Rails 4.0 or earlier
67
73
 
68
- For information on running Rails 3.0 through 4.0, see the README for the 1.x branch: https://github.com/blowmage/minitest-rails/tree/1.x#readme
74
+ For information on using minitest-rails with Rails 3.0 through 4.0, see the README for the 1.x branch: https://github.com/blowmage/minitest-rails/tree/1.x#readme
69
75
 
70
76
  == Capybara
71
77
 
data/Rakefile CHANGED
@@ -9,8 +9,8 @@ Hoe.plugin :gemspec
9
9
  Hoe.spec "minitest-rails" do
10
10
  developer "Mike Moore", "mike@blowmage.com"
11
11
 
12
- self.summary = "Minitest integration for Rails 4.1+"
13
- self.description = "Adds Minitest as the default testing library in Rails 3 and 4"
12
+ self.summary = "Minitest integration for Rails"
13
+ self.description = "Adds Minitest as the default testing library in Rails"
14
14
  self.urls = ["http://blowmage.com/minitest-rails"]
15
15
 
16
16
  self.history_file = "CHANGELOG.rdoc"
@@ -1,5 +1,6 @@
1
1
  require "test_helper"
2
2
 
3
+ <% module_namespacing do -%>
3
4
  describe <%= class_name %>Helper do
4
5
 
5
6
  it "must be a real test" do
@@ -7,3 +8,4 @@ describe <%= class_name %>Helper do
7
8
  end
8
9
 
9
10
  end
11
+ <% end -%>
@@ -9,7 +9,7 @@ module Minitest
9
9
  generators.fallbacks[:minitest] = :test_unit
10
10
 
11
11
  rake_tasks do
12
- load "minitest/rails/tasks/minitest.rake"
12
+ load "rails/test_unit/testing.rake"
13
13
  end
14
14
  end
15
15
  end
@@ -1,5 +1,5 @@
1
1
  module Minitest
2
2
  module Rails
3
- VERSION = "2.0.0.beta1"
3
+ VERSION = "2.0.0"
4
4
  end
5
5
  end
@@ -1,23 +1,23 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: minitest-rails 2.0.0.beta1.20140414183410 ruby lib
2
+ # stub: minitest-rails 2.0.0.20140421134437 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "minitest-rails"
6
- s.version = "2.0.0.beta1.20140414183410"
6
+ s.version = "2.0.0.20140421134437"
7
7
 
8
- s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
8
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib"]
10
10
  s.authors = ["Mike Moore"]
11
- s.date = "2014-04-15"
12
- s.description = "Adds Minitest as the default testing library in Rails 3 and 4"
11
+ s.date = "2014-04-21"
12
+ s.description = "Adds Minitest as the default testing library in Rails"
13
13
  s.email = ["mike@blowmage.com"]
14
14
  s.extra_rdoc_files = ["CHANGELOG.rdoc", "Manifest.txt", "README.rdoc"]
15
- s.files = [".autotest", ".gemtest", ".travis.yml", "CHANGELOG.rdoc", "Gemfile", "LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "gemfiles/4.1.gemfile", "lib/generators/.document", "lib/generators/minitest.rb", "lib/generators/minitest/controller/controller_generator.rb", "lib/generators/minitest/controller/templates/controller_spec.rb", "lib/generators/minitest/controller/templates/controller_test.rb", "lib/generators/minitest/generator/generator_generator.rb", "lib/generators/minitest/generator/templates/generator_spec.rb", "lib/generators/minitest/generator/templates/generator_test.rb", "lib/generators/minitest/helper/helper_generator.rb", "lib/generators/minitest/helper/templates/helper_spec.rb", "lib/generators/minitest/helper/templates/helper_test.rb", "lib/generators/minitest/install/install_generator.rb", "lib/generators/minitest/install/templates/test_helper.rb", "lib/generators/minitest/integration/integration_generator.rb", "lib/generators/minitest/integration/templates/integration_spec.rb", "lib/generators/minitest/integration/templates/integration_test.rb", "lib/generators/minitest/mailer/mailer_generator.rb", "lib/generators/minitest/mailer/templates/mailer_spec.rb", "lib/generators/minitest/mailer/templates/mailer_test.rb", "lib/generators/minitest/mailer/templates/preview.rb", "lib/generators/minitest/model/model_generator.rb", "lib/generators/minitest/model/templates/fixtures.yml", "lib/generators/minitest/model/templates/model_spec.rb", "lib/generators/minitest/model/templates/model_test.rb", "lib/generators/minitest/route/route_generator.rb", "lib/generators/minitest/route/templates/route_spec.rb", "lib/generators/minitest/route/templates/route_test.rb", "lib/generators/minitest/scaffold/scaffold_generator.rb", "lib/generators/minitest/scaffold/templates/controller_spec.rb", "lib/generators/minitest/scaffold/templates/controller_test.rb", "lib/minitest-rails.rb", "lib/minitest/rails.rb", "lib/minitest/rails/assertions.rb", "lib/minitest/rails/constant_lookup.rb", "lib/minitest/rails/expectations.rb", "lib/minitest/rails/railtie.rb", "lib/minitest/rails/tasks/.document", "lib/minitest/rails/tasks/minitest.rake", "lib/minitest/rails/tasks/sub_test_task.rb", "lib/minitest/rails/testing.rb", "lib/minitest/rails/version.rb", "minitest-rails.gemspec", "tasks/test.rake", "test/generators/test_controller_generator.rb", "test/generators/test_generator_generator.rb", "test/generators/test_helper_generator.rb", "test/generators/test_install_generator.rb", "test/generators/test_mailer_generator.rb", "test/generators/test_model_generator.rb", "test/generators/test_route_generator.rb", "test/generators/test_scaffold_generator.rb", "test/helper.rb", "test/rails/action_controller/test_assertions.rb", "test/rails/action_controller/test_controllers.rb", "test/rails/action_controller/test_expectations.rb", "test/rails/action_controller/test_spec_type.rb", "test/rails/action_dispatch/test_spec_type.rb", "test/rails/action_mailer/test_mailers.rb", "test/rails/action_mailer/test_spec_type.rb", "test/rails/action_view/test_helpers.rb", "test/rails/action_view/test_spec_type.rb", "test/rails/active_support/test_assertions.rb", "test/rails/active_support/test_expectations.rb", "test/rails/active_support/test_spec_type.rb", "test/rails/generators/test_spec_type.rb", "test/rails/minitest_5_api_test.rb", "test/rails/test_constant_lookup.rb", "test/test_sanity.rb"]
15
+ s.files = [".autotest", ".gemtest", ".travis.yml", "CHANGELOG.rdoc", "Gemfile", "LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "gemfiles/4.1.gemfile", "lib/generators/.document", "lib/generators/minitest.rb", "lib/generators/minitest/controller/controller_generator.rb", "lib/generators/minitest/controller/templates/controller_spec.rb", "lib/generators/minitest/controller/templates/controller_test.rb", "lib/generators/minitest/generator/generator_generator.rb", "lib/generators/minitest/generator/templates/generator_spec.rb", "lib/generators/minitest/generator/templates/generator_test.rb", "lib/generators/minitest/helper/helper_generator.rb", "lib/generators/minitest/helper/templates/helper_spec.rb", "lib/generators/minitest/helper/templates/helper_test.rb", "lib/generators/minitest/install/install_generator.rb", "lib/generators/minitest/install/templates/test_helper.rb", "lib/generators/minitest/integration/integration_generator.rb", "lib/generators/minitest/integration/templates/integration_spec.rb", "lib/generators/minitest/integration/templates/integration_test.rb", "lib/generators/minitest/mailer/mailer_generator.rb", "lib/generators/minitest/mailer/templates/mailer_spec.rb", "lib/generators/minitest/mailer/templates/mailer_test.rb", "lib/generators/minitest/mailer/templates/preview.rb", "lib/generators/minitest/model/model_generator.rb", "lib/generators/minitest/model/templates/fixtures.yml", "lib/generators/minitest/model/templates/model_spec.rb", "lib/generators/minitest/model/templates/model_test.rb", "lib/generators/minitest/route/route_generator.rb", "lib/generators/minitest/route/templates/route_spec.rb", "lib/generators/minitest/route/templates/route_test.rb", "lib/generators/minitest/scaffold/scaffold_generator.rb", "lib/generators/minitest/scaffold/templates/controller_spec.rb", "lib/generators/minitest/scaffold/templates/controller_test.rb", "lib/minitest-rails.rb", "lib/minitest/rails.rb", "lib/minitest/rails/assertions.rb", "lib/minitest/rails/constant_lookup.rb", "lib/minitest/rails/expectations.rb", "lib/minitest/rails/railtie.rb", "lib/minitest/rails/testing.rb", "lib/minitest/rails/version.rb", "minitest-rails.gemspec", "tasks/test.rake", "test/generators/test_controller_generator.rb", "test/generators/test_generator_generator.rb", "test/generators/test_helper_generator.rb", "test/generators/test_install_generator.rb", "test/generators/test_mailer_generator.rb", "test/generators/test_model_generator.rb", "test/generators/test_route_generator.rb", "test/generators/test_scaffold_generator.rb", "test/helper.rb", "test/rails/action_controller/test_assertions.rb", "test/rails/action_controller/test_controllers.rb", "test/rails/action_controller/test_expectations.rb", "test/rails/action_controller/test_spec_type.rb", "test/rails/action_dispatch/test_spec_type.rb", "test/rails/action_mailer/test_mailers.rb", "test/rails/action_mailer/test_spec_type.rb", "test/rails/action_view/test_helpers.rb", "test/rails/action_view/test_spec_type.rb", "test/rails/active_support/test_assertions.rb", "test/rails/active_support/test_expectations.rb", "test/rails/active_support/test_spec_type.rb", "test/rails/generators/test_spec_type.rb", "test/rails/minitest_5_api_test.rb", "test/rails/test_constant_lookup.rb", "test/test_sanity.rb"]
16
16
  s.homepage = "http://blowmage.com/minitest-rails"
17
17
  s.licenses = ["MIT"]
18
18
  s.rdoc_options = ["--main", "README.rdoc"]
19
19
  s.rubygems_version = "2.2.2"
20
- s.summary = "Minitest integration for Rails 4.1+"
20
+ s.summary = "Minitest integration for Rails"
21
21
  s.test_files = ["test/generators/test_controller_generator.rb", "test/generators/test_generator_generator.rb", "test/generators/test_helper_generator.rb", "test/generators/test_install_generator.rb", "test/generators/test_mailer_generator.rb", "test/generators/test_model_generator.rb", "test/generators/test_route_generator.rb", "test/generators/test_scaffold_generator.rb", "test/rails/action_controller/test_assertions.rb", "test/rails/action_controller/test_controllers.rb", "test/rails/action_controller/test_expectations.rb", "test/rails/action_controller/test_spec_type.rb", "test/rails/action_dispatch/test_spec_type.rb", "test/rails/action_mailer/test_mailers.rb", "test/rails/action_mailer/test_spec_type.rb", "test/rails/action_view/test_helpers.rb", "test/rails/action_view/test_spec_type.rb", "test/rails/active_support/test_assertions.rb", "test/rails/active_support/test_expectations.rb", "test/rails/active_support/test_spec_type.rb", "test/rails/generators/test_spec_type.rb", "test/rails/test_constant_lookup.rb", "test/test_sanity.rb", "test/rails/minitest_5_api_test.rb"]
22
22
 
23
23
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-15 00:00:00.000000000 Z
11
+ date: 2014-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -86,7 +86,7 @@ dependencies:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
88
  version: '3.11'
89
- description: Adds Minitest as the default testing library in Rails 3 and 4
89
+ description: Adds Minitest as the default testing library in Rails
90
90
  email:
91
91
  - mike@blowmage.com
92
92
  executables: []
@@ -142,9 +142,6 @@ files:
142
142
  - lib/minitest/rails/constant_lookup.rb
143
143
  - lib/minitest/rails/expectations.rb
144
144
  - lib/minitest/rails/railtie.rb
145
- - lib/minitest/rails/tasks/.document
146
- - lib/minitest/rails/tasks/minitest.rake
147
- - lib/minitest/rails/tasks/sub_test_task.rb
148
145
  - lib/minitest/rails/testing.rb
149
146
  - lib/minitest/rails/version.rb
150
147
  - minitest-rails.gemspec
@@ -191,15 +188,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
191
188
  version: '0'
192
189
  required_rubygems_version: !ruby/object:Gem::Requirement
193
190
  requirements:
194
- - - ">"
191
+ - - ">="
195
192
  - !ruby/object:Gem::Version
196
- version: 1.3.1
193
+ version: '0'
197
194
  requirements: []
198
195
  rubyforge_project:
199
196
  rubygems_version: 2.2.2
200
197
  signing_key:
201
198
  specification_version: 4
202
- summary: Minitest integration for Rails 4.1+
199
+ summary: Minitest integration for Rails
203
200
  test_files:
204
201
  - test/generators/test_controller_generator.rb
205
202
  - test/generators/test_generator_generator.rb
File without changes
@@ -1,121 +0,0 @@
1
- require "rake/testtask"
2
- require "minitest/rails/testing"
3
- require "minitest/rails/tasks/sub_test_task"
4
-
5
- namespace "test" do
6
- task :prepare do
7
- # Define here in case test_unit isn't loaded
8
- end
9
- end
10
-
11
- desc "Run default tests"
12
- task :minitest do
13
- Rake::Task["minitest:default"].invoke
14
- end
15
-
16
- namespace "minitest" do
17
-
18
- # Main entry point for minitest
19
- task :default do
20
- if ENV["TEST"]
21
- Rake::Task["minitest:single"].invoke
22
- else
23
- Rake::Task["minitest:run"].invoke
24
- end
25
- end
26
-
27
- # Run a single test
28
- Minitest::Rails::Tasks::SubTestTask.new(single: "test:prepare") do |t|
29
- t.libs << "test"
30
- end
31
-
32
- # Run the default tests as definded in Minitest::Rails::Testing.default_tasks
33
- Minitest::Rails::Tasks::SubTestTask.new(run: "test:prepare") do |t|
34
- t.libs.push "test"
35
- t.pattern = "test/{#{Minitest::Rails::Testing.default_tasks.join(',')}}/**/*_test.rb"
36
- end
37
-
38
- # Run the default tests as definded in Minitest::Rails::Testing.default_tasks
39
- desc "Runs the default tests, without resetting the db"
40
- Minitest::Rails::Tasks::SubTestTask.new(:quick) do |t|
41
- t.libs.push "test"
42
- t.pattern = "test/{#{Minitest::Rails::Testing.default_tasks.join(',')}}/**/*_test.rb"
43
- end
44
-
45
- desc "Runs all tests"
46
- Minitest::Rails::Tasks::SubTestTask.new(all: "test:prepare") do |t|
47
- t.libs.push "test"
48
- t.pattern = "test/**/*_test.rb"
49
- end
50
-
51
- namespace "all" do
52
- desc "Runs all tests, without resetting the db"
53
- Minitest::Rails::Tasks::SubTestTask.new(:quick) do |t|
54
- t.libs.push "test"
55
- t.pattern = "test/**/*_test.rb"
56
- end
57
- end
58
-
59
- # Loop that will define a task for each directory that has tests
60
- Minitest::Rails::Testing.all_tasks.each do |task_dir|
61
- unless Rake::Task.task_defined? "minitest:#{task_dir}"
62
- desc "Runs tests under test/#{task_dir}"
63
- Minitest::Rails::Tasks::SubTestTask.new(task_dir => "test:prepare") do |t|
64
- t.libs.push "test"
65
- t.pattern = "test/#{task_dir}/**/*_test.rb"
66
- end
67
- end
68
- end
69
-
70
- end
71
-
72
- # Statistics
73
-
74
- # set hook on stats task
75
- task stats: "minitest:setup_stats"
76
-
77
- namespace "minitest" do
78
- task :setup_stats do
79
- require "rails/code_statistics"
80
-
81
- # Clear existing test directories
82
- STATS_DIRECTORIES.reject! { |name, dir| dir.starts_with? Rails.root.join("test").to_s }
83
- CodeStatistics::TEST_TYPES.clear
84
-
85
- # Add test directories that minitest-rails knows about
86
- Minitest::Rails::Testing.all_tasks.each do |dir|
87
- name = "#{dir.capitalize} tests"
88
- STATS_DIRECTORIES << [ name, Rails.root.join("test").join(dir).to_s ]
89
- CodeStatistics::TEST_TYPES << name
90
- end
91
- end
92
- end
93
-
94
- # Define tasks under "test" if they don't already exist
95
- if !Rake::Task.task_defined? :test
96
- desc "Runs default tests"
97
- task test: "minitest"
98
-
99
- namespace "test" do
100
- Minitest::Rails::Testing.all_tasks.each do |task_dir|
101
- desc "Runs tests under test/#{task_dir}"
102
- task task_dir => "minitest:#{task_dir}"
103
- end
104
-
105
- desc "Runs the default tests, without resetting the db"
106
- task quick: "minitest:quick"
107
-
108
- desc "Runs all tests"
109
- task all: "minitest:all"
110
-
111
- namespace "all" do
112
- desc "Runs all tests, without resetting the db"
113
- task quick: "minitest:all:quick"
114
- end
115
- end
116
- end
117
-
118
- # Override the default task
119
- task default: [] # Just in case it hasn't already been set
120
- Rake::Task[:default].clear
121
- task default: "minitest"
@@ -1,14 +0,0 @@
1
- require 'rake/testtask'
2
-
3
- module Minitest
4
- module Rails
5
- module Tasks
6
- # Silence the default description to cut down on `rake -T` noise.
7
- class SubTestTask < Rake::TestTask
8
- def desc(string)
9
- # Ignore the description.
10
- end
11
- end
12
- end
13
- end
14
- end