hydeweb 0.0.8.pre2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. data/{CHANGELOG → HISTORY.md} +6 -0
  2. data/Rakefile +2 -52
  3. data/bin/hyde +3 -23
  4. data/bin/hyde01 +7 -0
  5. data/data/new_site/README.md +1 -1
  6. data/data/new_site/hyde.conf +9 -6
  7. data/lib/hyde/cli/helpers.rb +40 -0
  8. data/lib/hyde/cli.rb +86 -0
  9. data/lib/hyde/config.rb +37 -0
  10. data/lib/hyde/helpers.rb +6 -47
  11. data/lib/hyde/layout.rb +17 -9
  12. data/lib/hyde/meta.rb +5 -21
  13. data/lib/hyde/page.rb +207 -159
  14. data/lib/hyde/partial.rb +10 -5
  15. data/lib/hyde/project.rb +58 -208
  16. data/lib/hyde/server.rb +57 -0
  17. data/lib/hyde.rb +28 -51
  18. data/test/fixture/extensions/extensions/a/a.rb +1 -0
  19. data/test/fixture/extensions/hyde.conf +8 -0
  20. data/test/fixture/extensions/site/index.haml +1 -0
  21. data/test/fixture/fail_type/control/about/index.html +2 -0
  22. data/test/fixture/fail_type/control/about/us.html +2 -0
  23. data/test/fixture/fail_type/control/index.html +1 -0
  24. data/test/fixture/fail_type/hyde.conf +8 -0
  25. data/test/fixture/fail_type/site/index.haml +4 -0
  26. data/test/fixture/nested_layout/control/index.html +2 -0
  27. data/test/fixture/nested_layout/hyde.conf +8 -0
  28. data/test/fixture/nested_layout/layouts/default.haml +2 -0
  29. data/test/{fixtures/content_for/site/default.html.haml → fixture/nested_layout/layouts/post.haml} +1 -0
  30. data/test/fixture/nested_layout/site/index.haml +4 -0
  31. data/test/fixture/one/control/about/index.css +2 -0
  32. data/test/fixture/one/control/cheers.html +5 -0
  33. data/test/fixture/one/control/css/style.css +2 -0
  34. data/test/fixture/one/control/hello.html +5 -0
  35. data/test/fixture/one/control/hi.html +1 -0
  36. data/test/fixture/one/control/index.html +7 -0
  37. data/test/fixture/one/hyde.conf +9 -0
  38. data/test/fixture/one/layouts/default.haml +4 -0
  39. data/test/fixture/one/partials/menu.haml +3 -0
  40. data/test/fixture/one/site/about/index.scss +1 -0
  41. data/test/fixture/one/site/cheers.html.haml +1 -0
  42. data/test/fixture/one/site/css/style.scss +2 -0
  43. data/test/fixture/one/site/hello.haml +1 -0
  44. data/test/fixture/one/site/hi.html +1 -0
  45. data/test/fixture/one/site/index.haml +7 -0
  46. data/test/fixture/parent/control/about/index.html +2 -0
  47. data/test/fixture/parent/control/about/us.html +2 -0
  48. data/test/fixture/parent/control/index.html +1 -0
  49. data/test/fixture/parent/hyde.conf +8 -0
  50. data/test/fixture/parent/site/about/index.haml +3 -0
  51. data/test/fixture/parent/site/about/us.haml +3 -0
  52. data/test/fixture/parent/site/index.haml +3 -0
  53. data/test/fixture/sort/hyde.conf +8 -0
  54. data/test/fixture/sort/site/about/hardy.haml +4 -0
  55. data/test/fixture/sort/site/about/intrepid.haml +4 -0
  56. data/test/fixture/sort/site/about.haml +3 -0
  57. data/test/fixture/subclass/control/index.html +1 -0
  58. data/test/fixture/subclass/extensions/a/a.rb +12 -0
  59. data/test/fixture/subclass/hyde.conf +8 -0
  60. data/test/fixture/subclass/layouts/default.haml +1 -0
  61. data/test/fixture/subclass/layouts/post.haml +1 -0
  62. data/test/fixture/subclass/site/index.haml +4 -0
  63. data/test/helper.rb +15 -21
  64. data/test/unit/extensions_test.rb +16 -0
  65. data/test/unit/fixture_test.rb +77 -0
  66. data/test/unit/hyde_test.rb +30 -0
  67. metadata +107 -153
  68. data/.yardopts +0 -5
  69. data/LICENSE +0 -20
  70. data/VERSION +0 -1
  71. data/data/new_site/.gitignore +0 -24
  72. data/data/pages/404.html +0 -3
  73. data/hydeweb.gemspec +0 -159
  74. data/lib/hyde/clicommand.rb +0 -60
  75. data/lib/hyde/clicommands.rb +0 -128
  76. data/lib/hyde/ostruct.rb +0 -13
  77. data/lib/hyde/page_factory.rb +0 -90
  78. data/lib/hyde/renderer.rb +0 -133
  79. data/lib/hyde/renderers.rb +0 -100
  80. data/lib/hyde/sinatra/init.rb +0 -64
  81. data/lib/hyde/utils.rb +0 -43
  82. data/lib/hyde_misc/console.rb +0 -4
  83. data/manual/Extending/ExtendingHyde.md +0 -118
  84. data/manual/Hyde.md +0 -63
  85. data/manual/Introduction/Configuration.md +0 -70
  86. data/manual/Introduction/GettingStarted.md +0 -64
  87. data/manual/Introduction/Installation.md +0 -16
  88. data/manual/Introduction/Layouts.md +0 -14
  89. data/manual/Introduction/Metadata.md +0 -94
  90. data/manual/Introduction/Partials.md +0 -73
  91. data/manual/Introduction/TemplateLanguages.md +0 -59
  92. data/manual/Tips/Tips.md +0 -42
  93. data/test/fixtures/content_for/_config.yml +0 -8
  94. data/test/fixtures/content_for/layouts/cf-args.haml +0 -2
  95. data/test/fixtures/content_for/layouts/cf.haml +0 -14
  96. data/test/fixtures/content_for/layouts/default.haml +0 -4
  97. data/test/fixtures/content_for/layouts/shared/test.haml +0 -4
  98. data/test/fixtures/content_for/site/cf-args-default.haml +0 -2
  99. data/test/fixtures/content_for/site/cf-args.haml +0 -5
  100. data/test/fixtures/content_for/site/cf.haml +0 -6
  101. data/test/fixtures/content_for/site/cf2.haml +0 -3
  102. data/test/fixtures/content_for/site/index.html.haml +0 -9
  103. data/test/fixtures/content_for/site/var.html.haml +0 -5
  104. data/test/fixtures/content_for/www_control/cf-args-default.html +0 -1
  105. data/test/fixtures/content_for/www_control/cf-args.html +0 -2
  106. data/test/fixtures/content_for/www_control/cf.html +0 -17
  107. data/test/fixtures/content_for/www_control/cf2.html +0 -19
  108. data/test/fixtures/content_for/www_control/default.html +0 -2
  109. data/test/fixtures/content_for/www_control/index.html +0 -10
  110. data/test/fixtures/content_for/www_control/var.html +0 -2
  111. data/test/fixtures/custom/_config.yml +0 -8
  112. data/test/fixtures/custom/extensions/custom/custom.rb +0 -9
  113. data/test/fixtures/custom/layouts/default.haml +0 -8
  114. data/test/fixtures/custom/layouts/erbtest.erb +0 -2
  115. data/test/fixtures/custom/layouts/shared/sidebar.haml +0 -4
  116. data/test/fixtures/custom/site/about/index.html +0 -1
  117. data/test/fixtures/custom/site/assets/common.css.less +0 -1
  118. data/test/fixtures/custom/site/assets/style.css.less +0 -3
  119. data/test/fixtures/custom/site/foo.html.haml +0 -3
  120. data/test/fixtures/custom/site/index.html.haml +0 -6
  121. data/test/fixtures/custom/site/layout_test.html.haml +0 -6
  122. data/test/fixtures/custom/site/lol.html.erb +0 -7
  123. data/test/fixtures/custom/site/markdown.html.md +0 -8
  124. data/test/fixtures/custom/site/yes.html +0 -2
  125. data/test/fixtures/custom/www_control/about/index.html +0 -1
  126. data/test/fixtures/custom/www_control/assets/common.css +0 -1
  127. data/test/fixtures/custom/www_control/assets/style.css +0 -6
  128. data/test/fixtures/custom/www_control/foo.html +0 -1
  129. data/test/fixtures/custom/www_control/index.html +0 -16
  130. data/test/fixtures/custom/www_control/layout_test.html +0 -16
  131. data/test/fixtures/custom/www_control/lol.html +0 -5
  132. data/test/fixtures/custom/www_control/markdown.html +0 -17
  133. data/test/fixtures/custom/www_control/yes.html +0 -2
  134. data/test/fixtures/default/_config.yml +0 -8
  135. data/test/fixtures/default/extensions/custom/custom.rb +0 -2
  136. data/test/fixtures/default/layouts/default.haml +0 -5
  137. data/test/fixtures/default/site/about/index.html +0 -1
  138. data/test/fixtures/default/site/foo.html.haml +0 -3
  139. data/test/fixtures/default/site/index.html.haml +0 -6
  140. data/test/fixtures/default/site/layout_test.html.haml +0 -6
  141. data/test/fixtures/default/site/yes.html +0 -2
  142. data/test/fixtures/default/www_control/about/index.html +0 -1
  143. data/test/fixtures/default/www_control/foo.html +0 -1
  144. data/test/fixtures/default/www_control/index.html +0 -9
  145. data/test/fixtures/default/www_control/layout_test.html +0 -9
  146. data/test/fixtures/default/www_control/yes.html +0 -2
  147. data/test/test_all_fixtures.rb +0 -51
  148. data/test/test_build.rb +0 -20
  149. data/test/test_hyde.rb +0 -75
  150. data/test/test_page.rb +0 -26
  151. data/test/test_utils.rb +0 -22
data/manual/Tips/Tips.md DELETED
@@ -1,42 +0,0 @@
1
- Tips
2
- ====
3
-
4
- Here are some tips and tricks!
5
-
6
- Simpler folder structure
7
- ------------------------
8
-
9
- The default folder structure looks like this:
10
-
11
- project/
12
- hyde.conf
13
- layouts/
14
- partials/
15
- public/
16
- extensions/
17
- site/
18
- about.html
19
- contact.html
20
-
21
- Here is a cleaner structure often used in simpler projects:
22
-
23
- project/
24
- about.html
25
- contact.html
26
-
27
- .hyderc
28
- _/
29
- layouts/
30
- partials/
31
- public/
32
- extensions/
33
-
34
- You may do this by editing your Hyde config file like so:
35
-
36
- site_path: .
37
- layouts_path: _/layouts
38
- extensions_path: _/extensions
39
- partials_path: _/partials
40
- output_path: _/public
41
-
42
- Optionally, you can rename `hyde.conf` to `.hyderc` to make it even cleaner.
@@ -1,8 +0,0 @@
1
- ---
2
- layouts_path: layouts
3
- extensions_path: extensions
4
- site_path: site
5
- output_path: www
6
- ignore:
7
- - hyde
8
- - _*
@@ -1,2 +0,0 @@
1
- = yield_content :sidebar, "Aaron" do |name|
2
- = "Hola, #{name}!"
@@ -1,14 +0,0 @@
1
- !!! 5
2
- %html(lang='en')
3
- %head
4
- %meta(charset='UTF-8')
5
- %title Document
6
- %body
7
- #all
8
- #content
9
- = yield
10
-
11
- #sidebar
12
- = yield_content :sidebar do
13
- %div
14
- Default sidebar
@@ -1,4 +0,0 @@
1
- title: Default
2
- --
3
- %title= title
4
- = yield
@@ -1,4 +0,0 @@
1
- custom: "partial"
2
- --
3
- .partial
4
- = custom
@@ -1,2 +0,0 @@
1
- layout: cf-args
2
- --
@@ -1,5 +0,0 @@
1
- layout: cf-args
2
- --
3
- - content_for :sidebar do |i|
4
- Hello,
5
- %strong= "#{i}!"
@@ -1,6 +0,0 @@
1
- layout: cf
2
- --
3
- - content_for :sidebar do
4
- Sidebor
5
-
6
- Content here
@@ -1,3 +0,0 @@
1
- layout: cf
2
- --
3
- Content here, no sidebar
@@ -1,9 +0,0 @@
1
- layout: default
2
- title: Index
3
- --
4
- Hello
5
-
6
- %h3 Partial
7
- = partial 'shared/test'
8
- = partial 'shared/test', :custom => 'yip'
9
- / End
@@ -1,5 +0,0 @@
1
- var1: one
2
- var2: two
3
- --
4
- = var1
5
- = var2
@@ -1 +0,0 @@
1
- Hola, Aaron!
@@ -1,2 +0,0 @@
1
- Hello,
2
- <strong>Aaron!</strong>
@@ -1,17 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang='en'>
3
- <head>
4
- <meta charset='UTF-8' />
5
- <title>Document</title>
6
- </head>
7
- <body>
8
- <div id='all'>
9
- <div id='content'>
10
- Content here
11
- </div>
12
- <div id='sidebar'>
13
- Sidebor
14
- </div>
15
- </div>
16
- </body>
17
- </html>
@@ -1,19 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang='en'>
3
- <head>
4
- <meta charset='UTF-8' />
5
- <title>Document</title>
6
- </head>
7
- <body>
8
- <div id='all'>
9
- <div id='content'>
10
- Content here, no sidebar
11
- </div>
12
- <div id='sidebar'>
13
- <div>
14
- Default sidebar
15
- </div>
16
- </div>
17
- </div>
18
- </body>
19
- </html>
@@ -1,2 +0,0 @@
1
- <title>Default</title>
2
-
@@ -1,10 +0,0 @@
1
- <title>Index</title>
2
- Hello
3
- <h3>Partial</h3>
4
- <div class='partial'>
5
- partial
6
- </div>
7
- <div class='partial'>
8
- yip
9
- </div>
10
- <!-- End -->
@@ -1,2 +0,0 @@
1
- one
2
- two
@@ -1,8 +0,0 @@
1
- ---
2
- layouts_path: layouts
3
- extensions_path: extensions
4
- site_path: site
5
- output_path: www
6
- ignore:
7
- - hyde
8
- - _*
@@ -1,9 +0,0 @@
1
- module Hyde
2
- module Helpers
3
- module MyHelper
4
- def helper_function
5
- "This is from the helper"
6
- end
7
- end
8
- end
9
- end
@@ -1,8 +0,0 @@
1
- title: Site
2
- --
3
- %title= title
4
- != "<!-- (default layout) -->"
5
- %h2 Template
6
- %div
7
- =partial 'shared/sidebar'
8
- =yield
@@ -1,2 +0,0 @@
1
- Hello
2
- <%= yield %>
@@ -1,4 +0,0 @@
1
- %div#sidebar
2
- %ul
3
- %li
4
- Hello!
@@ -1 +0,0 @@
1
- About page.
@@ -1 +0,0 @@
1
- body { background: white; }
@@ -1,3 +0,0 @@
1
- @import "common.css.less";
2
- .test { outline: 0; }
3
- #menu { color: red; .test; }
@@ -1,3 +0,0 @@
1
- title: Foo
2
- --
3
- %h2 "Hellerrr"
@@ -1,6 +0,0 @@
1
- layout: default
2
- title: It works!
3
- --
4
- This is the index
5
- %strong
6
- Welcome to the index page!
@@ -1,6 +0,0 @@
1
- layout: default
2
- title: This is the meta title
3
- --
4
- This is the index
5
- %strong
6
- Welcome to the index page!
@@ -1,7 +0,0 @@
1
- yay: 444
2
- layout: erbtest
3
- title: This is from lol.html
4
- --
5
- Hey there!
6
- <%= yay %>
7
- <%= helper_function %>
@@ -1,8 +0,0 @@
1
- layout: default
2
- --
3
- Markdown test
4
- =============
5
-
6
- * This file is generated from Markdown.
7
- * ...
8
-
@@ -1,2 +0,0 @@
1
-
2
- Hello
@@ -1 +0,0 @@
1
- About page.
@@ -1 +0,0 @@
1
- body { background: white; }
@@ -1,6 +0,0 @@
1
- body { background: white; }
2
- .test { outline: 0; }
3
- #menu {
4
- color: red;
5
- outline: 0;
6
- }
@@ -1 +0,0 @@
1
- <h2>"Hellerrr"</h2>
@@ -1,16 +0,0 @@
1
- <title>It works!</title>
2
- <!-- (default layout) -->
3
- <h2>Template</h2>
4
- <div>
5
- <div id='sidebar'>
6
- <ul>
7
- <li>
8
- Hello!
9
- </li>
10
- </ul>
11
- </div>
12
- This is the index
13
- <strong>
14
- Welcome to the index page!
15
- </strong>
16
- </div>
@@ -1,16 +0,0 @@
1
- <title>This is the meta title</title>
2
- <!-- (default layout) -->
3
- <h2>Template</h2>
4
- <div>
5
- <div id='sidebar'>
6
- <ul>
7
- <li>
8
- Hello!
9
- </li>
10
- </ul>
11
- </div>
12
- This is the index
13
- <strong>
14
- Welcome to the index page!
15
- </strong>
16
- </div>
@@ -1,5 +0,0 @@
1
- Hello
2
- Hey there!
3
- 444
4
- This is from the helper
5
-
@@ -1,17 +0,0 @@
1
- <title>Site</title>
2
- <!-- (default layout) -->
3
- <h2>Template</h2>
4
- <div>
5
- <div id='sidebar'>
6
- <ul>
7
- <li>
8
- Hello!
9
- </li>
10
- </ul>
11
- </div>
12
- <h1 id='markdown_test'>Markdown test</h1>
13
-
14
- <ul>
15
- <li>This file is generated from Markdown. * &#8230;</li>
16
- </ul>
17
- </div>
@@ -1,2 +0,0 @@
1
-
2
- Hello
@@ -1,8 +0,0 @@
1
- ---
2
- layouts_path: layouts
3
- extensions_path: extensions
4
- site_path: site
5
- output_path: www
6
- ignore:
7
- - hyde
8
- - _*
@@ -1,2 +0,0 @@
1
- class CustomExtensionClass
2
- end
@@ -1,5 +0,0 @@
1
- %title= title
2
- != "<!-- (default layout) -->"
3
- %h2 Template
4
- %div
5
- =yield
@@ -1,3 +0,0 @@
1
- title: Foo
2
- --
3
- %h2 "Hellerrr"
@@ -1,6 +0,0 @@
1
- layout: default
2
- title: It works!
3
- --
4
- This is the index
5
- %strong
6
- Welcome to the index page!
@@ -1,6 +0,0 @@
1
- layout: default
2
- title: This is the meta title
3
- --
4
- This is the index
5
- %strong
6
- Welcome to the index page!
@@ -1,2 +0,0 @@
1
-
2
- Hello
@@ -1 +0,0 @@
1
- <h2>"Hellerrr"</h2>
@@ -1,9 +0,0 @@
1
- <title>It works!</title>
2
- <!-- (default layout) -->
3
- <h2>Template</h2>
4
- <div>
5
- This is the index
6
- <strong>
7
- Welcome to the index page!
8
- </strong>
9
- </div>
@@ -1,9 +0,0 @@
1
- <title>This is the meta title</title>
2
- <!-- (default layout) -->
3
- <h2>Template</h2>
4
- <div>
5
- This is the index
6
- <strong>
7
- Welcome to the index page!
8
- </strong>
9
- </div>
@@ -1,2 +0,0 @@
1
-
2
- Hello
@@ -1,51 +0,0 @@
1
- require "helper"
2
- require 'fileutils'
3
-
4
- class TestAllFixtures < Test::Unit::TestCase
5
- @@root = File.join(Dir.pwd, 'test', 'fixtures')
6
-
7
- def setup
8
- @original_pwd = Dir.pwd
9
- end
10
-
11
- def teardown
12
- # Remove all the generated www's
13
- Dir["#{@@root}/**/www"].each do |match|
14
- FileUtils.rm_rf match
15
- end
16
- Dir.chdir @original_pwd
17
- end
18
-
19
- def self.all_sites
20
- @@sites ||= Dir["#{@@root}/*"] \
21
- .select { |f| File.directory? f } \
22
- .map { |f| File.basename(f) }
23
- end
24
-
25
- all_sites.each do |site|
26
- describe "Test `#{site}`" do
27
- should "Build #{site} properly and have identical files to the control" do
28
- @project = Hyde::Project.new File.join(@@root, site)
29
- @project.build
30
-
31
- unknown_root = @project.root :output
32
- control_root = @project.root 'www_control'
33
-
34
- if not File.directory? control_root
35
- flunk "No www_control"
36
- else
37
- @project.files.reject { |f| File.directory? f }.each do |path|
38
- unknown_path = File.join(unknown_root, path)
39
- flunk "file #{unknown_path} doesn't exist" \
40
- unless File.exists?(unknown_path)
41
-
42
- unknown = File.open(File.join(unknown_root, path)).read
43
- control = File.open(File.join(control_root, path)).read
44
-
45
- assert_equal control, unknown
46
- end
47
- end
48
- end
49
- end
50
- end
51
- end
data/test/test_build.rb DELETED
@@ -1,20 +0,0 @@
1
- require 'helper'
2
-
3
- class TestBuild < Test::Unit::TestCase
4
- def setup
5
- @original_pwd = Dir.pwd
6
- @pwd = File.join(@original_pwd, 'test','fixtures','default')
7
- Dir.chdir @pwd
8
- @project = Hyde::Project.new(@pwd)
9
- end
10
-
11
- def teardown
12
- Dir.chdir @original_pwd
13
- end
14
-
15
- should "build" do
16
- @project.build
17
- # Test existence of files
18
- end
19
- end
20
-
data/test/test_hyde.rb DELETED
@@ -1,75 +0,0 @@
1
- require 'helper'
2
-
3
- class TestHyde < Test::Unit::TestCase
4
- def setup(site = 'default')
5
- @project = get_project site
6
- end
7
-
8
- should "return the right paths" do
9
- root_path = fixture 'default'
10
- assert_same_file root_path, @project.root
11
- assert_same_file File.join(root_path, 'layouts'), \
12
- @project.root(:layouts)
13
- assert_same_file File.join(root_path, 'layouts', 'abc'), \
14
- @project.root(:layouts, 'abc')
15
- assert_same_file File.join(root_path, 'layouts', 'abc'), \
16
- @project.root('layouts', 'abc')
17
- end
18
-
19
- should "Do things" do
20
- @project.render 'yes.html'
21
- @project.render 'foo.html'
22
- end
23
-
24
- should "recognize not found" do
25
- assert_raises Hyde::NotFound do
26
- @project.render 'garbage.html'
27
- end
28
- end
29
-
30
- should "load extensions" do
31
- begin
32
- CustomExtensionClass # Defined in the site's extensions/custom/custom.rb
33
- rescue NameError
34
- flunk "Extension wasn't loaded"
35
- end
36
- end
37
-
38
- should "use layouts" do
39
- output = @project['layout_test.html'].render
40
- assert_match /This is the meta title/, output
41
- assert_match /<!-- \(default layout\) -->/, output
42
- end
43
-
44
- should "account for index.html" do
45
- home_output = @project['index.html'].render
46
- assert_equal home_output, @project['/'].render
47
- assert_equal home_output, @project['/index.html'].render
48
-
49
- about_output = @project['/about/index.html'].render
50
- assert_equal about_output, @project['/about'].render
51
- assert_equal about_output, @project['/about/'].render
52
- end
53
-
54
- should "get types right" do
55
- page = @project['index.html']
56
- assert page.is_a? Hyde::Page
57
-
58
- layout = @project['default', Hyde::Layout]
59
- assert layout.is_a? Hyde::Layout
60
- assert layout.is_a? Hyde::Page
61
- end
62
-
63
- should "list the project files properly" do
64
- files = @project.files
65
- assert files.include? 'index.html'
66
- assert files.include? 'about/index.html'
67
- assert files.include? 'layout_test.html'
68
- assert !files.include?('about')
69
- assert !files.include?('about/')
70
- assert !files.include?('_config.yml')
71
- assert !files.include?('layout/default')
72
- assert !files.include?('layout/default.haml')
73
- assert !files.include?('layout_test.html.haml')
74
- end
75
- end
data/test/test_page.rb DELETED
@@ -1,26 +0,0 @@
1
- require 'helper'
2
-
3
- class TestPage < Test::Unit::TestCase
4
- def setup(site = 'default')
5
- @project = get_project site
6
- @page = Hyde::Page['index.html', @project]
7
- end
8
-
9
- should "raise a method missing error" do
10
- assert_raises NoMethodError do
11
- @page.xxx
12
- end
13
-
14
- # Should NOT raise a method missing error
15
- @page.layout
16
- @page.filename
17
- @page.renderer
18
- @page.meta
19
- @page.layout
20
- @page.project
21
- end
22
-
23
- should "register the right project" do
24
- assert_equal @project, @page.project
25
- end
26
- end
data/test/test_utils.rb DELETED
@@ -1,22 +0,0 @@
1
- require 'helper'
2
-
3
- class TestUtils < Test::Unit::TestCase
4
- def setup
5
- @original_pwd = Dir.pwd
6
- @pwd = File.join(@original_pwd, 'test')
7
- Dir.chdir @pwd
8
- end
9
-
10
- def teardown
11
- system 'rm -rf aaa'
12
- system 'rm -rf bbb'
13
- Dir.chdir @original_pwd
14
- end
15
-
16
- should "force_file_open" do
17
- f = force_file_open File.join(@pwd, 'bbb/ccc/test.txt')
18
- assert File.directory? 'bbb'
19
- assert File.directory? 'bbb/ccc'
20
- assert File.exists? 'bbb/ccc/test.txt'
21
- end
22
- end