merb_test_unit 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +26 -17
- metadata +3 -17
- data/test_unit_generators/merb_controller_test/merb_controller_test_generator.rb +0 -47
- data/test_unit_generators/merb_controller_test/templates/test/functional/%controller_full_file_path%_test.rb +0 -17
- data/test_unit_generators/merb_model_test/merb_model_test_generator.rb +0 -34
- data/test_unit_generators/merb_model_test/templates/test/unit/%model_file_name%_test.rb +0 -9
- data/test_unit_generators/merb_resource_controller_test/merb_resource_controller_test_generator.rb +0 -31
data/Rakefile
CHANGED
@@ -18,7 +18,7 @@ GEM_EMAIL = "ykatz@engineyard.com"
|
|
18
18
|
|
19
19
|
GEM_NAME = "merb_test_unit"
|
20
20
|
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
|
21
|
-
GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.
|
21
|
+
GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.8") + PKG_BUILD
|
22
22
|
|
23
23
|
RELEASE_NAME = "REL #{GEM_VERSION}"
|
24
24
|
|
@@ -36,7 +36,7 @@ spec = Gem::Specification.new do |s|
|
|
36
36
|
s.author = GEM_AUTHOR
|
37
37
|
s.email = GEM_EMAIL
|
38
38
|
s.homepage = PROJECT_URL
|
39
|
-
s.add_dependency('merb-core', '>= 0.9.
|
39
|
+
s.add_dependency('merb-core', '>= 0.9.8')
|
40
40
|
s.require_path = 'lib'
|
41
41
|
s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,test_unit_generators}/**/*")
|
42
42
|
end
|
@@ -45,25 +45,34 @@ Rake::GemPackageTask.new(spec) do |pkg|
|
|
45
45
|
pkg.gem_spec = spec
|
46
46
|
end
|
47
47
|
|
48
|
-
desc "
|
49
|
-
task :
|
50
|
-
|
51
|
-
file.puts spec.to_ruby
|
52
|
-
end
|
48
|
+
desc "Install the gem"
|
49
|
+
task :install do
|
50
|
+
Merb::RakeHelper.install(GEM_NAME, :version => GEM_VERSION)
|
53
51
|
end
|
54
52
|
|
55
|
-
|
56
|
-
|
57
|
-
|
53
|
+
desc "Uninstall the gem"
|
54
|
+
task :uninstall do
|
55
|
+
Merb::RakeHelper.uninstall(GEM_NAME, :version => GEM_VERSION)
|
56
|
+
end
|
58
57
|
|
59
|
-
desc "
|
60
|
-
task :
|
61
|
-
|
58
|
+
desc "Create a gemspec file"
|
59
|
+
task :gemspec do
|
60
|
+
File.open("#{GEM_NAME}.gemspec", "w") do |file|
|
61
|
+
file.puts spec.to_ruby
|
62
|
+
end
|
62
63
|
end
|
63
64
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
65
|
+
desc "Run all examples (or a specific spec with TASK=xxxx)"
|
66
|
+
Spec::Rake::SpecTask.new('spec') do |t|
|
67
|
+
t.spec_opts = ["-cfs"]
|
68
|
+
t.spec_files = begin
|
69
|
+
if ENV["TASK"]
|
70
|
+
ENV["TASK"].split(',').map { |task| "spec/**/#{task}_spec.rb" }
|
71
|
+
else
|
72
|
+
FileList['spec/**/*_spec.rb']
|
73
|
+
end
|
68
74
|
end
|
69
75
|
end
|
76
|
+
|
77
|
+
desc 'Default: run spec examples'
|
78
|
+
task :default => 'spec'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb_test_unit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yehuda Katz
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-10-07 00:00:00 +03:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.9.
|
23
|
+
version: 0.9.8
|
24
24
|
version:
|
25
25
|
description: Merb plugin that provides Test::Unit support
|
26
26
|
email: ykatz@engineyard.com
|
@@ -42,20 +42,6 @@ files:
|
|
42
42
|
- lib/merb_test_unit
|
43
43
|
- lib/merb_test_unit/merbtasks.rb
|
44
44
|
- lib/merb_test_unit.rb
|
45
|
-
- test_unit_generators/merb_controller_test
|
46
|
-
- test_unit_generators/merb_controller_test/merb_controller_test_generator.rb
|
47
|
-
- test_unit_generators/merb_controller_test/templates
|
48
|
-
- test_unit_generators/merb_controller_test/templates/test
|
49
|
-
- test_unit_generators/merb_controller_test/templates/test/functional
|
50
|
-
- test_unit_generators/merb_controller_test/templates/test/functional/%controller_full_file_path%_test.rb
|
51
|
-
- test_unit_generators/merb_model_test
|
52
|
-
- test_unit_generators/merb_model_test/merb_model_test_generator.rb
|
53
|
-
- test_unit_generators/merb_model_test/templates
|
54
|
-
- test_unit_generators/merb_model_test/templates/test
|
55
|
-
- test_unit_generators/merb_model_test/templates/test/unit
|
56
|
-
- test_unit_generators/merb_model_test/templates/test/unit/%model_file_name%_test.rb
|
57
|
-
- test_unit_generators/merb_resource_controller_test
|
58
|
-
- test_unit_generators/merb_resource_controller_test/merb_resource_controller_test_generator.rb
|
59
45
|
has_rdoc: true
|
60
46
|
homepage: http://merbivore.com
|
61
47
|
post_install_message:
|
@@ -1,47 +0,0 @@
|
|
1
|
-
class MerbControllerTestGenerator < Merb::GeneratorBase
|
2
|
-
attr_reader :controller_modules,
|
3
|
-
:controller_class_name,
|
4
|
-
:controller_file_name,
|
5
|
-
:controller_base_path,
|
6
|
-
:full_controller_const
|
7
|
-
|
8
|
-
def initialize(args, runtime_args = {})
|
9
|
-
@base = File.dirname(__FILE__)
|
10
|
-
super
|
11
|
-
@controller_modules = runtime_args[:controller_modules]
|
12
|
-
@controller_class_name = runtime_args[:controller_class_name]
|
13
|
-
@controller_file_name = runtime_args[:controller_file_name]
|
14
|
-
@controller_base_path = runtime_args[:controller_base_path]
|
15
|
-
@full_controller_const = runtime_args[:full_controller_const]
|
16
|
-
end
|
17
|
-
|
18
|
-
def manifest
|
19
|
-
record do |m|
|
20
|
-
@m = m
|
21
|
-
|
22
|
-
@assigns = {
|
23
|
-
:controller_modules => controller_modules,
|
24
|
-
:controller_class_name => controller_class_name,
|
25
|
-
:controller_full_file_path => controller_file_name,
|
26
|
-
:controller_file_name => controller_file_name.split("/").last,
|
27
|
-
:controller_base_path => controller_base_path,
|
28
|
-
:full_controller_const => full_controller_const
|
29
|
-
}
|
30
|
-
|
31
|
-
# make sure the directory is availalbe
|
32
|
-
m.directory File.join("test", "functional", "#{controller_base_path}")
|
33
|
-
|
34
|
-
copy_dirs
|
35
|
-
copy_files
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
protected
|
40
|
-
def banner
|
41
|
-
<<-EOS.split("\n").map{|x| x.strip}.join("\n")
|
42
|
-
Creates a basic Test::Unit Functional test stub.
|
43
|
-
|
44
|
-
USAGE: #{spec.name}"
|
45
|
-
EOS
|
46
|
-
end
|
47
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), "<%= Array.new((controller_modules.size + 1),'..').join("/") %>",'test_helper')
|
2
|
-
|
3
|
-
# Re-raise errors caught by the controller.
|
4
|
-
class <%= full_controller_const %>; def rescue_action(e) raise e end; end
|
5
|
-
|
6
|
-
class <%= full_controller_const %>Test < Test::Unit::TestCase
|
7
|
-
|
8
|
-
def setup
|
9
|
-
@controller = <%= full_controller_const %>.build(fake_request)
|
10
|
-
@controller.dispatch('index')
|
11
|
-
end
|
12
|
-
|
13
|
-
# Replace this with your real tests.
|
14
|
-
def test_should_be_setup
|
15
|
-
assert false
|
16
|
-
end
|
17
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
class MerbModelTestGenerator < Merb::GeneratorBase
|
2
|
-
attr_reader :model_attributes, :model_class_name, :model_file_name
|
3
|
-
|
4
|
-
def initialize(args, runtime_args = {})
|
5
|
-
@base = File.dirname(__FILE__)
|
6
|
-
super
|
7
|
-
@model_file_name = runtime_args[:model_file_name]
|
8
|
-
@model_attributes = runtime_args[:model_attributes]
|
9
|
-
@model_class_name = runtime_args[:model_class_name]
|
10
|
-
|
11
|
-
end
|
12
|
-
|
13
|
-
def manifest
|
14
|
-
record do |m|
|
15
|
-
@m = m
|
16
|
-
|
17
|
-
@assigns = { :model_file_name => model_file_name,
|
18
|
-
:model_attributes => model_attributes,
|
19
|
-
:model_class_name => model_class_name
|
20
|
-
}
|
21
|
-
copy_dirs
|
22
|
-
copy_files
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
protected
|
27
|
-
def banner
|
28
|
-
<<-EOS.split("\n").map{|x| x.strip}.join("\n")
|
29
|
-
Creates a basic Test::Unit unit test stub.
|
30
|
-
|
31
|
-
USAGE: #{spec.name}"
|
32
|
-
EOS
|
33
|
-
end
|
34
|
-
end
|
data/test_unit_generators/merb_resource_controller_test/merb_resource_controller_test_generator.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
class MerbControllerTestGenerator < Merb::GeneratorBase
|
2
|
-
attr_reader :controller_modules,
|
3
|
-
:controller_class_name,
|
4
|
-
:controller_file_name,
|
5
|
-
:controller_base_path,
|
6
|
-
:full_controller_const
|
7
|
-
|
8
|
-
def initialize(args, runtime_args = {})
|
9
|
-
@base = File.dirname(__FILE__)
|
10
|
-
super
|
11
|
-
@args = args
|
12
|
-
@runtime_args = runtime_args
|
13
|
-
end
|
14
|
-
|
15
|
-
def manifest
|
16
|
-
record do |m|
|
17
|
-
@m = m
|
18
|
-
|
19
|
-
m.dependency "merb_controller_test", @args, @runtime_args
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
protected
|
24
|
-
def banner
|
25
|
-
<<-EOS.split("\n").map{|x| x.strip}.join("\n")
|
26
|
-
Creates a basic Test::Unit Functional test stub.
|
27
|
-
|
28
|
-
USAGE: #{spec.name}"
|
29
|
-
EOS
|
30
|
-
end
|
31
|
-
end
|