roger 1.1.3 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.hound.yml +2 -0
- data/.rubocop.yml +47 -0
- data/.travis.yml +1 -5
- data/CHANGELOG.md +8 -0
- data/Gemfile +3 -3
- data/Rakefile +10 -4
- data/bin/roger +1 -1
- data/doc/mockupfile.md +97 -0
- data/doc/templating.md +5 -1
- data/examples/default_template/Gemfile +1 -1
- data/lib/roger/cli.rb +41 -36
- data/lib/roger/cli/command.rb +2 -4
- data/lib/roger/cli/generate.rb +1 -0
- data/lib/roger/cli/release.rb +2 -2
- data/lib/roger/cli/serve.rb +11 -11
- data/lib/roger/cli/test.rb +6 -5
- data/lib/roger/extractor.rb +42 -43
- data/lib/roger/generators.rb +27 -19
- data/lib/roger/generators/generator.rb +7 -10
- data/lib/roger/generators/new.rb +56 -41
- data/lib/roger/generators/templates/generator.tt +5 -5
- data/lib/roger/helpers/get_callable.rb +15 -14
- data/lib/roger/helpers/logging.rb +35 -13
- data/lib/roger/mockupfile.rb +13 -23
- data/lib/roger/project.rb +41 -34
- data/lib/roger/rack/roger.rb +28 -29
- data/lib/roger/rack/sleep.rb +4 -5
- data/lib/roger/release.rb +95 -72
- data/lib/roger/release/cleaner.rb +14 -13
- data/lib/roger/release/finalizers.rb +10 -10
- data/lib/roger/release/finalizers/dir.rb +17 -19
- data/lib/roger/release/finalizers/git_branch.rb +76 -38
- data/lib/roger/release/finalizers/rsync.rb +60 -49
- data/lib/roger/release/finalizers/zip.rb +32 -29
- data/lib/roger/release/injector.rb +43 -37
- data/lib/roger/release/processors.rb +24 -22
- data/lib/roger/release/processors/mockup.rb +97 -69
- data/lib/roger/release/processors/url_relativizer.rb +57 -30
- data/lib/roger/release/scm.rb +30 -27
- data/lib/roger/release/scm/git.rb +101 -92
- data/lib/roger/resolver.rb +86 -61
- data/lib/roger/server.rb +52 -27
- data/lib/roger/template.rb +102 -74
- data/lib/roger/test.rb +16 -13
- data/lib/roger/version.rb +3 -2
- data/roger.gemspec +9 -5
- data/test/helpers/cli.rb +17 -15
- data/test/project/Gemfile +2 -2
- data/test/project/html/formats/csv.rcsv +0 -0
- data/test/project/lib/generators/test.rb +2 -3
- data/test/project/lib/tests/fail/fail.rb +5 -6
- data/test/project/lib/tests/noop/lib/cli.rb +2 -1
- data/test/project/lib/tests/noop/lib/test.rb +5 -5
- data/test/project/lib/tests/noop/noop.rb +2 -1
- data/test/project/lib/tests/succeed/succeed.rb +5 -6
- data/test/unit/cli/cli_base_test.rb +2 -3
- data/test/unit/cli/cli_generate_test.rb +9 -10
- data/test/unit/cli/cli_serve_test.rb +22 -18
- data/test/unit/cli/cli_test_test.rb +13 -15
- data/test/unit/cli/cli_version_test.rb +4 -4
- data/test/unit/generators_test.rb +8 -10
- data/test/unit/helpers/logging_test.rb +64 -0
- data/test/unit/rack/roger_test.rb +21 -0
- data/test/unit/release/cleaner_test.rb +23 -19
- data/test/unit/release/finalizers/git_branch_test.rb +2 -1
- data/test/unit/release/finalizers/zip_test.rb +48 -0
- data/test/unit/release/mockup_test.rb +48 -0
- data/test/unit/release/processors_test.rb +19 -19
- data/test/unit/release_test.rb +15 -14
- data/test/unit/resolver_test.rb +21 -14
- data/test/unit/server_test.rb +31 -0
- data/test/unit/template_test.rb +58 -36
- data/test/unit/test_test.rb +3 -2
- metadata +35 -9
- data/test/Mockupfile-syntax.rb +0 -93
@@ -1,47 +1,47 @@
|
|
1
1
|
require "./lib/roger/release.rb"
|
2
2
|
require "test/unit"
|
3
3
|
|
4
|
+
# Test Roger processors
|
4
5
|
class ProcessorsTest < ::Test::Unit::TestCase
|
5
6
|
def setup
|
6
7
|
Roger::Release::Processors.map.clear
|
7
8
|
end
|
8
9
|
|
9
10
|
def test_register_processor
|
10
|
-
processor =
|
11
|
+
processor = ->(_e) { fail "ProcessorName" }
|
11
12
|
assert Roger::Release::Processors.register(:name, processor)
|
12
|
-
assert_equal Roger::Release::Processors.map,
|
13
|
+
assert_equal Roger::Release::Processors.map, name: processor
|
13
14
|
end
|
14
15
|
|
15
16
|
def test_register_processor_with_symbol_only_name
|
16
|
-
processor =
|
17
|
+
processor = ->(_e) { fail "ProcessorName" }
|
17
18
|
|
18
|
-
assert_raise(ArgumentError)
|
19
|
-
Roger::Release::Processors.register("name", processor)
|
20
|
-
|
19
|
+
assert_raise(ArgumentError) do
|
20
|
+
Roger::Release::Processors.register("name", processor)
|
21
|
+
end
|
21
22
|
|
22
|
-
assert_raise(ArgumentError)
|
23
|
-
Roger::Release::Processors.register("name", processor)
|
24
|
-
|
23
|
+
assert_raise(ArgumentError) do
|
24
|
+
Roger::Release::Processors.register("name", processor)
|
25
|
+
end
|
25
26
|
end
|
26
27
|
|
27
28
|
def test_register_processor_with_same_name
|
28
|
-
processor =
|
29
|
+
processor = ->(_e) { fail "ProcessorName" }
|
29
30
|
Roger::Release::Processors.register(:name, processor)
|
30
31
|
|
31
|
-
assert_raise(ArgumentError)
|
32
|
-
Roger::Release::Processors.register(:name, processor)
|
33
|
-
|
32
|
+
assert_raise(ArgumentError) do
|
33
|
+
Roger::Release::Processors.register(:name, processor)
|
34
|
+
end
|
34
35
|
end
|
35
36
|
|
36
37
|
def test_register_processor_with_same_contents
|
37
|
-
processor =
|
38
|
+
processor = ->(_e) { fail "ProcessorName" }
|
38
39
|
Roger::Release::Processors.register(:name, processor)
|
39
40
|
|
40
|
-
assert_nothing_raised
|
41
|
-
Roger::Release::Processors.register(:name2, processor)
|
42
|
-
|
41
|
+
assert_nothing_raised do
|
42
|
+
Roger::Release::Processors.register(:name2, processor)
|
43
|
+
end
|
43
44
|
|
44
|
-
assert_equal Roger::Release::Processors.map,
|
45
|
+
assert_equal Roger::Release::Processors.map, name: processor, name2: processor
|
45
46
|
end
|
46
|
-
|
47
47
|
end
|
data/test/unit/release_test.rb
CHANGED
@@ -3,20 +3,19 @@ require "./lib/roger/release.rb"
|
|
3
3
|
require "test/unit"
|
4
4
|
|
5
5
|
module Roger
|
6
|
+
# Test Roger Release
|
6
7
|
class ReleaseTest < ::Test::Unit::TestCase
|
7
|
-
|
8
8
|
def setup
|
9
|
-
@project = Project.new(File.dirname(__FILE__) + "/../project", :
|
9
|
+
@project = Project.new(File.dirname(__FILE__) + "/../project", mockupfile_path: false)
|
10
10
|
@mockupfile = Roger::Mockupfile.new(@project)
|
11
11
|
end
|
12
12
|
|
13
|
-
|
14
13
|
def test_run_should_set_project_mode
|
15
14
|
assert_equal @project.mode, nil
|
16
15
|
|
17
16
|
# Running a blank release
|
18
|
-
@mockupfile.release(:
|
19
|
-
r.use
|
17
|
+
@mockupfile.release(blank: true) do |r|
|
18
|
+
r.use proc{|release|
|
20
19
|
assert_equal release.project.mode, :release
|
21
20
|
}
|
22
21
|
end
|
@@ -26,7 +25,7 @@ module Roger
|
|
26
25
|
end
|
27
26
|
|
28
27
|
def test_blank_release_should_have_no_processors_and_finalizers
|
29
|
-
@mockupfile.release(:
|
28
|
+
@mockupfile.release(blank: true)
|
30
29
|
@project.release.run!
|
31
30
|
|
32
31
|
assert @project.release.stack.empty?
|
@@ -34,31 +33,33 @@ module Roger
|
|
34
33
|
end
|
35
34
|
|
36
35
|
def test_get_callable
|
37
|
-
p =
|
36
|
+
p = -> {}
|
38
37
|
assert_equal Release.get_callable(p, {}), p
|
39
|
-
assert_raise(ArgumentError){ Release.get_callable(nil, {})}
|
38
|
+
assert_raise(ArgumentError) { Release.get_callable(nil, {}) }
|
40
39
|
end
|
41
40
|
|
42
41
|
def test_get_callable_with_map
|
43
|
-
p =
|
42
|
+
p = -> {}
|
44
43
|
map = {
|
45
|
-
:
|
44
|
+
lambda: p
|
46
45
|
}
|
47
46
|
|
48
47
|
assert_equal Release.get_callable(:lambda, map), p
|
49
|
-
assert_raise(ArgumentError){ Release.get_callable(:huh, map)}
|
48
|
+
assert_raise(ArgumentError) { Release.get_callable(:huh, map) }
|
50
49
|
end
|
51
50
|
|
51
|
+
# A Release class that is valid
|
52
52
|
class Works
|
53
53
|
def call; end
|
54
54
|
end
|
55
|
+
|
56
|
+
# A Release class that is invalid
|
55
57
|
class Breaks
|
56
58
|
end
|
57
59
|
|
58
60
|
def test_get_callable_with_class
|
59
61
|
assert Release.get_callable(Works, {}).instance_of?(Works)
|
60
|
-
assert_raise(ArgumentError){ Release.get_callable(Breaks, {}) }
|
62
|
+
assert_raise(ArgumentError) { Release.get_callable(Breaks, {}) }
|
61
63
|
end
|
62
|
-
|
63
64
|
end
|
64
|
-
end
|
65
|
+
end
|
data/test/unit/resolver_test.rb
CHANGED
@@ -3,6 +3,7 @@ require "./lib/roger/resolver.rb"
|
|
3
3
|
require "test/unit"
|
4
4
|
|
5
5
|
module Roger
|
6
|
+
# Test Roger resolver
|
6
7
|
class ResolverTest < ::Test::Unit::TestCase
|
7
8
|
def setup
|
8
9
|
@base = Pathname.new(File.dirname(__FILE__) + "/../project/html")
|
@@ -27,19 +28,22 @@ module Roger
|
|
27
28
|
|
28
29
|
def test_find_template_with_template_extension
|
29
30
|
assert_equal @resolver.find_template("formats/markdown"), @base + "formats/markdown.md"
|
30
|
-
end
|
31
|
+
end
|
31
32
|
|
32
33
|
def test_find_template_with_double_extensions
|
33
34
|
assert_equal @resolver.find_template("formats/erb"), @base + "formats/erb.html.erb"
|
34
35
|
assert_equal @resolver.find_template("formats/erb.html"), @base + "formats/erb.html.erb"
|
35
36
|
|
36
37
|
assert_equal @resolver.find_template("formats/json.json"), @base + "formats/json.json.erb"
|
37
|
-
end
|
38
|
+
end
|
38
39
|
|
39
40
|
def test_find_template_with_preferred_extension
|
40
|
-
assert_equal
|
41
|
+
assert_equal(
|
42
|
+
@resolver.find_template("formats/json", preferred_extension: "json"),
|
43
|
+
@base + "formats/json.json.erb"
|
44
|
+
)
|
41
45
|
end
|
42
|
-
|
46
|
+
|
43
47
|
def test_find_template_exact_match
|
44
48
|
# TODO
|
45
49
|
end
|
@@ -49,15 +53,24 @@ module Roger
|
|
49
53
|
end
|
50
54
|
|
51
55
|
def test_path_to_url_relative_to_relative_path
|
52
|
-
assert_equal
|
56
|
+
assert_equal(
|
57
|
+
@resolver.path_to_url(@base + "formats/erb.html.erb", "../front_matter/erb.html.erb"),
|
58
|
+
"../formats/erb.html.erb"
|
59
|
+
)
|
53
60
|
end
|
54
61
|
|
55
62
|
def test_path_to_url_relative_to_absolute_path
|
56
|
-
assert_equal
|
63
|
+
assert_equal(
|
64
|
+
@resolver.path_to_url(
|
65
|
+
@base + "formats/erb.html.erb",
|
66
|
+
@base.realpath + "front_matter/erb.html.erb"
|
67
|
+
),
|
68
|
+
"../formats/erb.html.erb"
|
69
|
+
)
|
57
70
|
end
|
58
|
-
|
59
71
|
end
|
60
72
|
|
73
|
+
# Test resolver with multiple load paths
|
61
74
|
class ResolverMultipleTest < ::Test::Unit::TestCase
|
62
75
|
def setup
|
63
76
|
@base = Pathname.new(File.dirname(__FILE__) + "/../project")
|
@@ -82,11 +95,5 @@ module Roger
|
|
82
95
|
|
83
96
|
assert_equal @resolver.find_template("formats/erb"), @base + "partials/formats/erb.html.erb"
|
84
97
|
end
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
98
|
end
|
91
|
-
|
92
|
-
end
|
99
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require "test/unit"
|
2
|
+
require File.dirname(__FILE__) + "../../../lib/roger/rack/roger"
|
3
|
+
|
4
|
+
module Roger
|
5
|
+
# Test Roger Server test
|
6
|
+
class ServerTest < ::Test::Unit::TestCase
|
7
|
+
def setup
|
8
|
+
@project = Project.new(File.dirname(__FILE__) + "/../../project", mockupfile_path: false)
|
9
|
+
@server = Server.new(@project)
|
10
|
+
end
|
11
|
+
|
12
|
+
# Test to see if env["roger.project"] is set
|
13
|
+
def test_env_roger_project_is_set
|
14
|
+
test = Class.new do
|
15
|
+
def initialize(_app)
|
16
|
+
end
|
17
|
+
|
18
|
+
def call(env)
|
19
|
+
[200, {}, [env["roger.project"].object_id.to_s]]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
@server.use test
|
24
|
+
|
25
|
+
request = ::Rack::MockRequest.new(@server.send(:application))
|
26
|
+
|
27
|
+
# This is a bit of a clunky comparison but it suffices for now
|
28
|
+
assert_equal @project.object_id.to_s, request.get("/").body
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/test/unit/template_test.rb
CHANGED
@@ -4,18 +4,19 @@ require "./lib/roger/template.rb"
|
|
4
4
|
require "test/unit"
|
5
5
|
|
6
6
|
module Roger
|
7
|
+
# Roger template tests
|
7
8
|
class TemplateTest < ::Test::Unit::TestCase
|
8
9
|
def setup
|
9
10
|
@base = Pathname.new(File.dirname(__FILE__) + "/../project")
|
10
11
|
@config = {
|
11
|
-
:
|
12
|
-
:
|
12
|
+
partials_path: @base + "partials",
|
13
|
+
layouts_path: @base + "layouts",
|
14
|
+
source_path: @base + "html/test.html.erb"
|
13
15
|
}
|
14
16
|
@template_path = @base + "html"
|
15
17
|
end
|
16
18
|
|
17
19
|
def test_encoding
|
18
|
-
|
19
20
|
end
|
20
21
|
|
21
22
|
# Extension
|
@@ -30,8 +31,11 @@ module Roger
|
|
30
31
|
}
|
31
32
|
|
32
33
|
mime_types.each do |ext, ext_out|
|
33
|
-
assert_equal
|
34
|
-
|
34
|
+
assert_equal(
|
35
|
+
ext_out,
|
36
|
+
Template.new("", @config.update(source_path: @base + "html/file.#{ext}")).source_extension
|
37
|
+
)
|
38
|
+
end
|
35
39
|
end
|
36
40
|
|
37
41
|
def test_target_extension
|
@@ -44,11 +48,13 @@ module Roger
|
|
44
48
|
}
|
45
49
|
|
46
50
|
mime_types.each do |ext, ext_out|
|
47
|
-
assert_equal
|
48
|
-
|
51
|
+
assert_equal(
|
52
|
+
ext_out,
|
53
|
+
Template.new("", @config.update(source_path: @base + "html/file.#{ext}")).target_extension
|
54
|
+
)
|
55
|
+
end
|
49
56
|
end
|
50
57
|
|
51
|
-
|
52
58
|
# Mime type
|
53
59
|
def test_target_mime_type
|
54
60
|
mime_types = {
|
@@ -59,16 +65,19 @@ module Roger
|
|
59
65
|
}
|
60
66
|
|
61
67
|
mime_types.each do |ext, mime|
|
62
|
-
assert_equal
|
68
|
+
assert_equal(
|
69
|
+
mime,
|
70
|
+
Template.new("", @config.update(source_path: @base + "html/file.#{ext}")).target_mime_type
|
71
|
+
)
|
63
72
|
end
|
64
73
|
end
|
65
74
|
|
66
75
|
# Front-matter
|
67
76
|
|
68
77
|
def test_front_matter_partial_access
|
69
|
-
template = Template.new("---\ntest: yay!\n---\n<%= partial 'test/front_matter' %>", @config
|
78
|
+
template = Template.new("---\ntest: yay!\n---\n<%= partial 'test/front_matter' %>", @config)
|
70
79
|
assert_equal template.render, "yay!"
|
71
|
-
end
|
80
|
+
end
|
72
81
|
|
73
82
|
# Partials
|
74
83
|
|
@@ -76,39 +85,46 @@ module Roger
|
|
76
85
|
end
|
77
86
|
|
78
87
|
def test_partial
|
79
|
-
template = Template.new("<%= partial 'test/simple' %>", @config
|
88
|
+
template = Template.new("<%= partial 'test/simple' %>", @config)
|
80
89
|
assert_equal template.render, "ERB"
|
81
90
|
|
82
|
-
template = Template.new(
|
91
|
+
template = Template.new(
|
92
|
+
"<%= partial 'test/simple.html' %>",
|
93
|
+
@config.update(source_path: @base + "html/test.erb")
|
94
|
+
)
|
83
95
|
assert_equal template.render, "ERB"
|
84
96
|
end
|
85
97
|
|
86
98
|
def test_partial_with_double_template_extensions
|
87
|
-
template = Template.new(
|
99
|
+
template = Template.new(
|
100
|
+
"<%= partial 'test/json.json' %>",
|
101
|
+
@config.update(source_path: @base + "html/test.erb")
|
102
|
+
)
|
88
103
|
assert_equal template.render, "{ key: value }"
|
89
104
|
end
|
90
105
|
|
91
106
|
def test_partial_with_preferred_extension
|
92
|
-
template = Template.new("<%= partial 'test/json' %>", @config
|
93
|
-
assert_raise(ArgumentError)
|
107
|
+
template = Template.new("<%= partial 'test/json' %>", @config)
|
108
|
+
assert_raise(ArgumentError) do
|
94
109
|
template.render
|
95
|
-
|
96
|
-
|
97
|
-
|
110
|
+
end
|
111
|
+
template = Template.new(
|
112
|
+
"<%= partial 'test/json' %>",
|
113
|
+
@config.update(source_path: @base + "html/test.json.erb")
|
114
|
+
)
|
98
115
|
assert_equal template.render, "{ key: value }"
|
99
|
-
|
100
116
|
end
|
101
117
|
|
102
118
|
def test_partial_with_block
|
103
|
-
template = Template.new("<% partial 'test/yield' do %>CONTENT<% end %>", @config
|
119
|
+
template = Template.new("<% partial 'test/yield' do %>CONTENT<% end %>", @config)
|
104
120
|
assert_equal template.render, "B-CONTENT-A"
|
105
121
|
|
106
|
-
template = Template.new("<% partial 'test/yield' do %><%= 'CONTENT' %><% end %>", @config
|
122
|
+
template = Template.new("<% partial 'test/yield' do %><%= 'CONTENT' %><% end %>", @config)
|
107
123
|
assert_equal template.render, "B-CONTENT-A"
|
108
124
|
end
|
109
125
|
|
110
126
|
def test_partial_with_block_without_yield
|
111
|
-
template = Template.new("<% partial 'test/simple' do %>CONTENT<% end %>", @config
|
127
|
+
template = Template.new("<% partial 'test/simple' do %>CONTENT<% end %>", @config)
|
112
128
|
assert_equal template.render, "ERB"
|
113
129
|
end
|
114
130
|
|
@@ -117,37 +133,43 @@ module Roger
|
|
117
133
|
def test_content_for_not_returning_in_template
|
118
134
|
content_for_block = 'B<% content_for :one do %><%= "one" %><% end %>A'
|
119
135
|
|
120
|
-
template = Template.new(
|
136
|
+
template = Template.new(
|
137
|
+
content_for_block,
|
138
|
+
@config.update(source_path: @base + "html/test.erb")
|
139
|
+
)
|
121
140
|
assert_equal template.render, "BA"
|
122
141
|
end
|
123
142
|
|
124
143
|
def test_content_for_yield_in_layout
|
125
|
-
content_for_block = "---\nlayout: \"yield\"\n---\
|
144
|
+
content_for_block = "---\nlayout: \"yield\"\n---\n"
|
145
|
+
content_for_block << "B<% content_for :one do %><%= \"one\" %><% end %>A"
|
126
146
|
|
127
|
-
template = Template.new(content_for_block, @config
|
128
|
-
assert_equal template.render, "BAone"
|
147
|
+
template = Template.new(content_for_block, @config)
|
148
|
+
assert_equal template.render, "BAone"
|
129
149
|
end
|
130
150
|
|
131
151
|
def test_content_for_yield_in_layout_without_content_for
|
132
152
|
content_for_block = "---\nlayout: \"yield\"\n---\nBA"
|
133
153
|
|
134
|
-
template = Template.new(content_for_block, @config
|
154
|
+
template = Template.new(content_for_block, @config)
|
135
155
|
assert_equal template.render, "BA"
|
136
|
-
end
|
156
|
+
end
|
137
157
|
|
138
158
|
def test_content_for_yield_with_partial_with_block
|
139
|
-
|
159
|
+
template_string = "---\nlayout: \"yield\"\n---\nB"
|
160
|
+
template_string << "<% content_for :one do %>"
|
161
|
+
template_string << "<% partial 'test/yield' do %>CONTENT<% end %>"
|
162
|
+
template_string << "<% end %>A"
|
163
|
+
|
164
|
+
template = Template.new(template_string, @config)
|
140
165
|
assert_equal template.render, "BAB-CONTENT-A"
|
141
166
|
end
|
142
167
|
|
143
168
|
# Environment
|
144
169
|
|
145
170
|
def test_template_env
|
146
|
-
template = Template.new("<%= env[:test] %>", @config
|
147
|
-
assert_equal template.render(:
|
171
|
+
template = Template.new("<%= env[:test] %>", @config)
|
172
|
+
assert_equal template.render(test: "test"), "test"
|
148
173
|
end
|
149
|
-
|
150
|
-
|
151
|
-
|
152
174
|
end
|
153
|
-
end
|
175
|
+
end
|
data/test/unit/test_test.rb
CHANGED
@@ -4,13 +4,14 @@ require "mocha/test_unit"
|
|
4
4
|
require "./lib/roger/test.rb"
|
5
5
|
|
6
6
|
module Roger
|
7
|
+
# Testing the Roger Test fucntionality
|
7
8
|
class TestTest < ::Test::Unit::TestCase
|
8
9
|
def setup
|
9
10
|
@files = ["html/javascripts/site.js",
|
10
11
|
"html/vendor/underscore/underscore.js"]
|
11
12
|
@globs = stub(map: @files)
|
12
13
|
|
13
|
-
@project = Project.new(File.dirname(__FILE__) + "/../project", :
|
14
|
+
@project = Project.new(File.dirname(__FILE__) + "/../project", mockupfile_path: false)
|
14
15
|
@mockupfile = Roger::Mockupfile.new(@project)
|
15
16
|
end
|
16
17
|
|
@@ -18,7 +19,7 @@ module Roger
|
|
18
19
|
assert_equal @project.mode, nil
|
19
20
|
|
20
21
|
@mockupfile.test do |t|
|
21
|
-
t.use
|
22
|
+
t.use proc{|test|
|
22
23
|
assert_equal test.project.mode, :test
|
23
24
|
}
|
24
25
|
end
|