minitest-rails 1.0.0.beta3 → 1.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: 5fba8dbe456d79e63f8d9298b12fc82946ca59f7
4
- data.tar.gz: 438db68bc4f585d428bb12bae76a8708060257bf
3
+ metadata.gz: 9da640f8490dbe94c8afbf0bcb4ff09c13190938
4
+ data.tar.gz: 87912e02f1001fec0e9ae084b9e919e38c6b8f2c
5
5
  SHA512:
6
- metadata.gz: fea4d564ac893fd7c99e9ccb97228f37bbb29041382a342982271202ed3917804ac01b83f9f4f0110143780fb453ec2830f4b7649fa839404286e9897df727c4
7
- data.tar.gz: 9d15c9d42439de18d67c4c5142469ff35e5b74f43cf6bda12fbf3fe8b04d1d2305b6c9f3f5542cc10d39f519326a823ecbf91fc075d06366c7706f7529ee6c73
6
+ metadata.gz: 4ea956c2165f225b52d08a6a953af80393e0d103f55983943942c5aadc0db3a21b019180bc099813466779a59954ebe7d3c2b272d7b96f5107e0b5621d154e37
7
+ data.tar.gz: ce377ad557be865cd24ec9ea0d41f66b64d417928990593f5024a0271b1a2cfee27d9617a2e43df53eb570004b1d1973d4268f9c164585dabeabf4204ad37522
data/.travis.yml CHANGED
@@ -8,6 +8,8 @@ notifications:
8
8
  email:
9
9
  - mike@blowmage.com
10
10
  rvm:
11
+ - 2.1.1
12
+ - 2.1.0
11
13
  - 2.0.0
12
14
  - 1.9.3
13
15
  - 1.8.7
data/Rakefile CHANGED
@@ -1,17 +1,17 @@
1
1
  # -*- ruby -*-
2
2
 
3
- require 'rubygems'
4
- require 'hoe'
3
+ require "rubygems"
4
+ require "hoe"
5
5
 
6
6
  Hoe.plugin :git
7
7
  Hoe.plugin :gemspec
8
8
 
9
- Hoe.spec 'minitest-rails' do
10
- developer 'Mike Moore', 'mike@blowmage.com'
9
+ Hoe.spec "minitest-rails" do
10
+ developer "Mike Moore", "mike@blowmage.com"
11
11
 
12
- self.summary = 'MiniTest integration for Rails 3 and 4'
13
- self.description = 'Adds MiniTest as the default testing library in Rails 3 and 4'
14
- self.urls = ['http://blowmage.com/minitest-rails']
12
+ self.summary = "MiniTest integration for Rails 3 and 4"
13
+ self.description = "Adds MiniTest as the default testing library in Rails 3 and 4"
14
+ self.urls = ["http://blowmage.com/minitest-rails"]
15
15
 
16
16
  self.history_file = "CHANGELOG.rdoc"
17
17
  self.readme_file = "README.rdoc"
@@ -19,10 +19,10 @@ Hoe.spec 'minitest-rails' do
19
19
 
20
20
  license "MIT"
21
21
 
22
- dependency 'minitest', '~> 4.7'
23
- dependency 'minitest-test', '~> 1.0'
24
- dependency 'railties', '>= 3.0'
25
- dependency 'fakefs', '~> 0.4', :dev
22
+ dependency "minitest", "~> 4.7"
23
+ dependency "minitest-test", "~> 1.0"
24
+ dependency "railties", [ ">= 3.0", "< 4.1" ]
25
+ dependency "fakefs", "= 0.4.3", :dev
26
26
  end
27
27
 
28
28
  Dir["tasks/**/*.rake"].each { |t| load t }
data/gemfiles/3.1.gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem "rails", "~> 3.1.11"
3
+ gem "rails", "~> 3.1.12"
4
4
  gem "rake"
5
5
  gem "rdoc", "~> 3.10"
data/gemfiles/3.2.gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem "rails", "~> 3.2.13"
3
+ gem "rails", "~> 3.2.17"
4
4
  gem "rake"
5
5
  gem "rdoc", "~> 3.10"
data/gemfiles/4.0.gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem "rails", "~> 4.0.0"
3
+ gem "rails", "~> 4.0.4"
4
4
  gem "rake"
@@ -20,7 +20,7 @@ module MiniTest
20
20
 
21
21
  def module_namespacing(&block)
22
22
  yield if block_given?
23
- end unless respond_to? :module_namespacing
23
+ end unless instance_methods(true).map(&:to_sym).include? :module_namespacing
24
24
 
25
25
  def key_value(key, value)
26
26
  if options[:old_style_hash] || RUBY_VERSION < '1.9'
@@ -28,14 +28,14 @@ module MiniTest
28
28
  else
29
29
  "#{key}: #{value}"
30
30
  end
31
- end unless respond_to? :key_value
31
+ end unless instance_methods(true).map(&:to_sym).include? :key_value
32
32
 
33
33
  def attributes_names
34
34
  @attributes_names ||= attributes.each_with_object([]) do |a, names|
35
35
  names << a.column_name
36
36
  names << "#{a.name}_type" if a.polymorphic?
37
37
  end
38
- end unless respond_to? :attributes_names
38
+ end unless instance_methods(true).map(&:to_sym).include? :attributes_names
39
39
 
40
40
  end
41
41
  end
@@ -91,11 +91,29 @@ namespace "minitest" do
91
91
  end
92
92
  end
93
93
 
94
- # Override the test task
95
- task :test => [] # Just in case it hasn't already been set
96
- Rake::Task[:test].clear
97
- desc "Runs default tests"
98
- task :test => "minitest"
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
99
117
 
100
118
  # Override the default task
101
119
  task :default => [] # Just in case it hasn't already been set
@@ -1,5 +1,5 @@
1
1
  module MiniTest
2
2
  module Rails
3
- VERSION = "1.0.0.beta3"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -1,13 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: minitest-rails 1.0.0.beta3.20140123185750 ruby lib
2
+ # stub: minitest-rails 1.0.0.20140414095814 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "minitest-rails"
6
- s.version = "1.0.0.beta3.20140123185750"
6
+ s.version = "1.0.0.20140414095814"
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
+ s.require_paths = ["lib"]
9
10
  s.authors = ["Mike Moore"]
10
- s.date = "2014-01-23"
11
+ s.date = "2014-04-14"
11
12
  s.description = "Adds MiniTest as the default testing library in Rails 3 and 4"
12
13
  s.email = ["mike@blowmage.com"]
13
14
  s.extra_rdoc_files = ["CHANGELOG.rdoc", "Manifest.txt", "README.rdoc"]
@@ -15,9 +16,7 @@ Gem::Specification.new do |s|
15
16
  s.homepage = "http://blowmage.com/minitest-rails"
16
17
  s.licenses = ["MIT"]
17
18
  s.rdoc_options = ["--main", "README.rdoc"]
18
- s.require_paths = ["lib"]
19
- s.rubyforge_project = "minitest-rails"
20
- s.rubygems_version = "2.1.11"
19
+ s.rubygems_version = "2.2.2"
21
20
  s.summary = "MiniTest integration for Rails 3 and 4"
22
21
  s.test_files = ["test/generators/test_controller_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"]
23
22
 
@@ -27,24 +26,24 @@ Gem::Specification.new do |s|
27
26
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
28
27
  s.add_runtime_dependency(%q<minitest>, ["~> 4.7"])
29
28
  s.add_runtime_dependency(%q<minitest-test>, ["~> 1.0"])
30
- s.add_runtime_dependency(%q<railties>, [">= 3.0"])
29
+ s.add_runtime_dependency(%q<railties>, ["< 4.1", ">= 3.0"])
31
30
  s.add_development_dependency(%q<rdoc>, ["~> 4.0"])
32
- s.add_development_dependency(%q<fakefs>, ["~> 0.4"])
33
- s.add_development_dependency(%q<hoe>, ["~> 3.7"])
31
+ s.add_development_dependency(%q<fakefs>, ["= 0.4.3"])
32
+ s.add_development_dependency(%q<hoe>, ["~> 3.11"])
34
33
  else
35
34
  s.add_dependency(%q<minitest>, ["~> 4.7"])
36
35
  s.add_dependency(%q<minitest-test>, ["~> 1.0"])
37
- s.add_dependency(%q<railties>, [">= 3.0"])
36
+ s.add_dependency(%q<railties>, ["< 4.1", ">= 3.0"])
38
37
  s.add_dependency(%q<rdoc>, ["~> 4.0"])
39
- s.add_dependency(%q<fakefs>, ["~> 0.4"])
40
- s.add_dependency(%q<hoe>, ["~> 3.7"])
38
+ s.add_dependency(%q<fakefs>, ["= 0.4.3"])
39
+ s.add_dependency(%q<hoe>, ["~> 3.11"])
41
40
  end
42
41
  else
43
42
  s.add_dependency(%q<minitest>, ["~> 4.7"])
44
43
  s.add_dependency(%q<minitest-test>, ["~> 1.0"])
45
- s.add_dependency(%q<railties>, [">= 3.0"])
44
+ s.add_dependency(%q<railties>, ["< 4.1", ">= 3.0"])
46
45
  s.add_dependency(%q<rdoc>, ["~> 4.0"])
47
- s.add_dependency(%q<fakefs>, ["~> 0.4"])
48
- s.add_dependency(%q<hoe>, ["~> 3.7"])
46
+ s.add_dependency(%q<fakefs>, ["= 0.4.3"])
47
+ s.add_dependency(%q<hoe>, ["~> 3.11"])
49
48
  end
50
49
  end
data/tasks/test.rake CHANGED
@@ -1,30 +1,34 @@
1
1
  namespace :test do
2
2
  desc "Run tests for Rails 4.0"
3
3
  task "4.0" do
4
+ sh "rm -f Gemfile.lock"
4
5
  ENV["RAILS_VERSION"] = "4.0"
5
6
  sh "bundle && bundle exec rake test"
6
- sh "rm Gemfile.lock"
7
+ sh "rm -f Gemfile.lock"
7
8
  end
8
9
 
9
10
  desc "Run tests for Rails 3.2"
10
11
  task "3.2" do
12
+ sh "rm -f Gemfile.lock"
11
13
  ENV["RAILS_VERSION"] = "3.2"
12
14
  sh "bundle && bundle exec rake test"
13
- sh "rm Gemfile.lock"
15
+ sh "rm -f Gemfile.lock"
14
16
  end
15
17
 
16
18
  desc "Run tests for Rails 3.1"
17
19
  task "3.1" do
20
+ sh "rm -f Gemfile.lock"
18
21
  ENV["RAILS_VERSION"] = "3.1"
19
22
  sh "bundle && bundle exec rake test"
20
- sh "rm Gemfile.lock"
23
+ sh "rm -f Gemfile.lock"
21
24
  end
22
25
 
23
26
  desc "Run tests for Rails 3.0"
24
27
  task "3.0" do
28
+ sh "rm -f Gemfile.lock"
25
29
  ENV["RAILS_VERSION"] = "3.0"
26
30
  sh "bundle && bundle exec rake test"
27
- sh "rm Gemfile.lock"
31
+ sh "rm -f Gemfile.lock"
28
32
  end
29
33
 
30
34
  desc "Run tests for all Rails versions"
@@ -35,4 +39,3 @@ namespace :test do
35
39
  sh "rake test:3.0"
36
40
  end
37
41
  end
38
-
@@ -21,6 +21,22 @@ class TestControllerGenerator < GeneratorTest
21
21
  assert_match(/class Admin::UserControllerTest/m, contents)
22
22
  end
23
23
 
24
+ def test_module_namespaced_controller_generator
25
+ assert_nil Rails::Generators.namespace
26
+ Rails::Generators.namespace = TestApp
27
+
28
+ assert_output(/create test\/controllers\/test_app\/user_controller_test.rb/m) do
29
+ MiniTest::Generators::ControllerGenerator.start ["user"]
30
+ end
31
+ assert File.exists? "test/controllers/test_app/user_controller_test.rb"
32
+ contents = File.read "test/controllers/test_app/user_controller_test.rb"
33
+ assert_match(/module TestApp/m, contents)
34
+ assert_match(/class UserControllerTest/m, contents)
35
+ ensure
36
+ # Restore default namespace
37
+ Rails::Generators.namespace = nil
38
+ end if Rails::Generators.respond_to? :namespace
39
+
24
40
  def test_controller_generator_spec
25
41
  assert_output(/create test\/controllers\/user_controller_test.rb/m) do
26
42
  MiniTest::Generators::ControllerGenerator.start ["user", "--spec"]
@@ -21,6 +21,22 @@ class TestModelGenerator < GeneratorTest
21
21
  assert_match(/class Admin::UserTest/m, contents)
22
22
  end
23
23
 
24
+ def test_module_namespaced_model_generator
25
+ assert_nil Rails::Generators.namespace
26
+ Rails::Generators.namespace = TestApp
27
+
28
+ assert_output(/create test\/models\/test_app\/user_test.rb/m) do
29
+ MiniTest::Generators::ModelGenerator.start ["user"]
30
+ end
31
+ assert File.exists? "test/models/test_app/user_test.rb"
32
+ contents = File.read "test/models/test_app/user_test.rb"
33
+ assert_match(/module TestApp/m, contents)
34
+ assert_match(/class UserTest/m, contents)
35
+ ensure
36
+ # Restore default namespace
37
+ Rails::Generators.namespace = nil
38
+ end if Rails::Generators.respond_to? :namespace
39
+
24
40
  def test_model_generator_spec
25
41
  assert_output(/create test\/models\/user_test.rb/m) do
26
42
  MiniTest::Generators::ModelGenerator.start ["user", "--spec"]
metadata CHANGED
@@ -1,99 +1,105 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta3
4
+ version: 1.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-01-23 00:00:00.000000000 Z
11
+ date: 2014-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.7'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest-test
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: railties
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3.0'
48
+ - - "<"
49
+ - !ruby/object:Gem::Version
50
+ version: '4.1'
48
51
  type: :runtime
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
51
54
  requirements:
52
- - - '>='
55
+ - - ">="
53
56
  - !ruby/object:Gem::Version
54
57
  version: '3.0'
58
+ - - "<"
59
+ - !ruby/object:Gem::Version
60
+ version: '4.1'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: rdoc
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
- - - ~>
65
+ - - "~>"
60
66
  - !ruby/object:Gem::Version
61
67
  version: '4.0'
62
68
  type: :development
63
69
  prerelease: false
64
70
  version_requirements: !ruby/object:Gem::Requirement
65
71
  requirements:
66
- - - ~>
72
+ - - "~>"
67
73
  - !ruby/object:Gem::Version
68
74
  version: '4.0'
69
75
  - !ruby/object:Gem::Dependency
70
76
  name: fakefs
71
77
  requirement: !ruby/object:Gem::Requirement
72
78
  requirements:
73
- - - ~>
79
+ - - '='
74
80
  - !ruby/object:Gem::Version
75
- version: '0.4'
81
+ version: 0.4.3
76
82
  type: :development
77
83
  prerelease: false
78
84
  version_requirements: !ruby/object:Gem::Requirement
79
85
  requirements:
80
- - - ~>
86
+ - - '='
81
87
  - !ruby/object:Gem::Version
82
- version: '0.4'
88
+ version: 0.4.3
83
89
  - !ruby/object:Gem::Dependency
84
90
  name: hoe
85
91
  requirement: !ruby/object:Gem::Requirement
86
92
  requirements:
87
- - - ~>
93
+ - - "~>"
88
94
  - !ruby/object:Gem::Version
89
- version: '3.7'
95
+ version: '3.11'
90
96
  type: :development
91
97
  prerelease: false
92
98
  version_requirements: !ruby/object:Gem::Requirement
93
99
  requirements:
94
- - - ~>
100
+ - - "~>"
95
101
  - !ruby/object:Gem::Version
96
- version: '3.7'
102
+ version: '3.11'
97
103
  description: Adds MiniTest as the default testing library in Rails 3 and 4
98
104
  email:
99
105
  - mike@blowmage.com
@@ -104,9 +110,9 @@ extra_rdoc_files:
104
110
  - Manifest.txt
105
111
  - README.rdoc
106
112
  files:
107
- - .autotest
108
- - .gemtest
109
- - .travis.yml
113
+ - ".autotest"
114
+ - ".gemtest"
115
+ - ".travis.yml"
110
116
  - CHANGELOG.rdoc
111
117
  - Gemfile
112
118
  - LICENSE
@@ -188,23 +194,23 @@ licenses:
188
194
  metadata: {}
189
195
  post_install_message:
190
196
  rdoc_options:
191
- - --main
197
+ - "--main"
192
198
  - README.rdoc
193
199
  require_paths:
194
200
  - lib
195
201
  required_ruby_version: !ruby/object:Gem::Requirement
196
202
  requirements:
197
- - - '>='
203
+ - - ">="
198
204
  - !ruby/object:Gem::Version
199
205
  version: '0'
200
206
  required_rubygems_version: !ruby/object:Gem::Requirement
201
207
  requirements:
202
- - - '>'
208
+ - - ">="
203
209
  - !ruby/object:Gem::Version
204
- version: 1.3.1
210
+ version: '0'
205
211
  requirements: []
206
- rubyforge_project: minitest-rails
207
- rubygems_version: 2.1.11
212
+ rubyforge_project:
213
+ rubygems_version: 2.2.2
208
214
  signing_key:
209
215
  specification_version: 4
210
216
  summary: MiniTest integration for Rails 3 and 4