themes_on_rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +110 -0
  4. data/Rakefile +60 -0
  5. data/lib/generators/themes_on_rails/templates/all.css +9 -0
  6. data/lib/generators/themes_on_rails/templates/all.js +7 -0
  7. data/lib/generators/themes_on_rails/templates/layout.html.erb +14 -0
  8. data/lib/generators/themes_on_rails/templates/layout.html.haml +9 -0
  9. data/lib/generators/themes_on_rails/theme_generator.rb +52 -0
  10. data/lib/themes_on_rails/action_controller.rb +61 -0
  11. data/lib/themes_on_rails/controller_additions.rb +13 -0
  12. data/lib/themes_on_rails/engine.rb +6 -0
  13. data/lib/themes_on_rails/railtie.rb +17 -0
  14. data/lib/themes_on_rails/version.rb +3 -0
  15. data/lib/themes_on_rails.rb +9 -0
  16. data/spec/dummy/README.rdoc +28 -0
  17. data/spec/dummy/Rakefile +6 -0
  18. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  19. data/spec/dummy/app/assets/javascripts/posts.js +2 -0
  20. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  21. data/spec/dummy/app/assets/stylesheets/posts.css +4 -0
  22. data/spec/dummy/app/assets/stylesheets/scaffold.css +56 -0
  23. data/spec/dummy/app/controllers/application_controller.rb +9 -0
  24. data/spec/dummy/app/controllers/posts_controller.rb +68 -0
  25. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  26. data/spec/dummy/app/helpers/posts_helper.rb +2 -0
  27. data/spec/dummy/app/models/post.rb +2 -0
  28. data/spec/dummy/app/themes/basic_blue/assets/javascripts/basic_blue/all.js +7 -0
  29. data/spec/dummy/app/themes/basic_blue/assets/stylesheets/basic_blue/all.css +9 -0
  30. data/spec/dummy/app/themes/basic_blue/views/layouts/basic_blue.html.haml +9 -0
  31. data/spec/dummy/app/themes/basic_blue/views/posts/_form.html.erb +25 -0
  32. data/spec/dummy/app/themes/basic_blue/views/posts/edit.html.erb +6 -0
  33. data/spec/dummy/app/themes/basic_blue/views/posts/index.html.erb +29 -0
  34. data/spec/dummy/app/themes/basic_blue/views/posts/new.html.erb +5 -0
  35. data/spec/dummy/app/themes/basic_blue/views/posts/show.html.erb +15 -0
  36. data/spec/dummy/app/themes/professional_blue/assets/javascripts/professional_blue/all.js +7 -0
  37. data/spec/dummy/app/themes/professional_blue/assets/stylesheets/professional_blue/all.css +9 -0
  38. data/spec/dummy/app/themes/professional_blue/views/layouts/professional_blue.html.haml +9 -0
  39. data/spec/dummy/app/themes/professional_blue/views/posts/_form.html.erb +25 -0
  40. data/spec/dummy/app/themes/professional_blue/views/posts/edit.html.erb +6 -0
  41. data/spec/dummy/app/themes/professional_blue/views/posts/index.html.erb +29 -0
  42. data/spec/dummy/app/themes/professional_blue/views/posts/new.html.erb +5 -0
  43. data/spec/dummy/app/themes/professional_blue/views/posts/show.html.erb +15 -0
  44. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  45. data/spec/dummy/app/views/posts/_form.html.erb +25 -0
  46. data/spec/dummy/app/views/posts/edit.html.erb +6 -0
  47. data/spec/dummy/app/views/posts/index.html.erb +29 -0
  48. data/spec/dummy/app/views/posts/new.html.erb +5 -0
  49. data/spec/dummy/app/views/posts/show.html.erb +14 -0
  50. data/spec/dummy/bin/bundle +3 -0
  51. data/spec/dummy/bin/rails +4 -0
  52. data/spec/dummy/bin/rake +4 -0
  53. data/spec/dummy/config/application.rb +22 -0
  54. data/spec/dummy/config/boot.rb +5 -0
  55. data/spec/dummy/config/database.yml +25 -0
  56. data/spec/dummy/config/environment.rb +5 -0
  57. data/spec/dummy/config/environments/development.rb +29 -0
  58. data/spec/dummy/config/environments/production.rb +80 -0
  59. data/spec/dummy/config/environments/test.rb +36 -0
  60. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  61. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  62. data/spec/dummy/config/initializers/inflections.rb +16 -0
  63. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  64. data/spec/dummy/config/initializers/secret_token.rb +12 -0
  65. data/spec/dummy/config/initializers/session_store.rb +3 -0
  66. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  67. data/spec/dummy/config/locales/en.yml +23 -0
  68. data/spec/dummy/config/routes.rb +58 -0
  69. data/spec/dummy/config.ru +4 -0
  70. data/spec/dummy/db/development.sqlite3 +0 -0
  71. data/spec/dummy/db/migrate/20131120082307_create_posts.rb +10 -0
  72. data/spec/dummy/db/schema.rb +23 -0
  73. data/spec/dummy/db/test.sqlite3 +0 -0
  74. data/spec/dummy/log/development.log +1581 -0
  75. data/spec/dummy/log/test.log +4042 -0
  76. data/spec/dummy/public/404.html +58 -0
  77. data/spec/dummy/public/422.html +58 -0
  78. data/spec/dummy/public/500.html +57 -0
  79. data/spec/dummy/public/favicon.ico +0 -0
  80. data/spec/dummy/spec/controllers/posts_controller_spec.rb +47 -0
  81. data/spec/dummy/spec/spec_helper.rb +44 -0
  82. data/spec/dummy/tmp/cache/assets/development/sprockets/0cfcea8e64323f692964ade04baf71bf +0 -0
  83. data/spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  84. data/spec/dummy/tmp/cache/assets/development/sprockets/1b2584b22e1970da0ea00056c0149492 +0 -0
  85. data/spec/dummy/tmp/cache/assets/development/sprockets/1e8f75a6b5b33970fb8e397347caa0a1 +0 -0
  86. data/spec/dummy/tmp/cache/assets/development/sprockets/24204f742af588c8166d3160b500d20f +0 -0
  87. data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  88. data/spec/dummy/tmp/cache/assets/development/sprockets/301390a2f715e632e51eaceadc864bd8 +0 -0
  89. data/spec/dummy/tmp/cache/assets/development/sprockets/3059f09ecb35a9d6a17cc629cf142cad +0 -0
  90. data/spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  91. data/spec/dummy/tmp/cache/assets/development/sprockets/371bf96e99717688ed7313a0c53f4212 +0 -0
  92. data/spec/dummy/tmp/cache/assets/development/sprockets/3773504c128301fa4ae43322c265863c +0 -0
  93. data/spec/dummy/tmp/cache/assets/development/sprockets/416150dc3ac35079c94273cc46e90aa6 +0 -0
  94. data/spec/dummy/tmp/cache/assets/development/sprockets/510da110ae528e2d22533be39ff696c5 +0 -0
  95. data/spec/dummy/tmp/cache/assets/development/sprockets/5384ad85f52d3272dbc64d46ef3876a4 +0 -0
  96. data/spec/dummy/tmp/cache/assets/development/sprockets/6fc757c2c8329244ca95d6909865bbc2 +0 -0
  97. data/spec/dummy/tmp/cache/assets/development/sprockets/8b1b55ee928fcc1ca79651b5a54d12b1 +0 -0
  98. data/spec/dummy/tmp/cache/assets/development/sprockets/97b428fb2be48bdef1c2edc6895007e6 +0 -0
  99. data/spec/dummy/tmp/cache/assets/development/sprockets/a144f874a0fbcfbf57e914e54950b2b8 +0 -0
  100. data/spec/dummy/tmp/cache/assets/development/sprockets/a6505a19f1ef24ad643489939529b237 +0 -0
  101. data/spec/dummy/tmp/cache/assets/development/sprockets/aea240771414d6f51f0eeffa97de34c0 +0 -0
  102. data/spec/dummy/tmp/cache/assets/development/sprockets/c6062fc388a3fcd36f0407b7de58b073 +0 -0
  103. data/spec/dummy/tmp/cache/assets/development/sprockets/c85016e7bbd4f3adbb7635d01f85d39b +0 -0
  104. data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  105. data/spec/dummy/tmp/cache/assets/development/sprockets/d066c004d1fd26ae76a61303a7a18145 +0 -0
  106. data/spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  107. data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  108. data/spec/dummy/tmp/cache/assets/development/sprockets/fbce05c1fbdc18388ed134c8e4100ac8 +0 -0
  109. data/spec/dummy/tmp/cache/assets/test/sprockets/0cfcea8e64323f692964ade04baf71bf +0 -0
  110. data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  111. data/spec/dummy/tmp/cache/assets/test/sprockets/1b2584b22e1970da0ea00056c0149492 +0 -0
  112. data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  113. data/spec/dummy/tmp/cache/assets/test/sprockets/301390a2f715e632e51eaceadc864bd8 +0 -0
  114. data/spec/dummy/tmp/cache/assets/test/sprockets/3059f09ecb35a9d6a17cc629cf142cad +0 -0
  115. data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  116. data/spec/dummy/tmp/cache/assets/test/sprockets/371bf96e99717688ed7313a0c53f4212 +0 -0
  117. data/spec/dummy/tmp/cache/assets/test/sprockets/3773504c128301fa4ae43322c265863c +0 -0
  118. data/spec/dummy/tmp/cache/assets/test/sprockets/416150dc3ac35079c94273cc46e90aa6 +0 -0
  119. data/spec/dummy/tmp/cache/assets/test/sprockets/5384ad85f52d3272dbc64d46ef3876a4 +0 -0
  120. data/spec/dummy/tmp/cache/assets/test/sprockets/6fc757c2c8329244ca95d6909865bbc2 +0 -0
  121. data/spec/dummy/tmp/cache/assets/test/sprockets/8b1b55ee928fcc1ca79651b5a54d12b1 +0 -0
  122. data/spec/dummy/tmp/cache/assets/test/sprockets/97b428fb2be48bdef1c2edc6895007e6 +0 -0
  123. data/spec/dummy/tmp/cache/assets/test/sprockets/a144f874a0fbcfbf57e914e54950b2b8 +0 -0
  124. data/spec/dummy/tmp/cache/assets/test/sprockets/a6505a19f1ef24ad643489939529b237 +0 -0
  125. data/spec/dummy/tmp/cache/assets/test/sprockets/aea240771414d6f51f0eeffa97de34c0 +0 -0
  126. data/spec/dummy/tmp/cache/assets/test/sprockets/c6062fc388a3fcd36f0407b7de58b073 +0 -0
  127. data/spec/dummy/tmp/cache/assets/test/sprockets/c85016e7bbd4f3adbb7635d01f85d39b +0 -0
  128. data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  129. data/spec/dummy/tmp/cache/assets/test/sprockets/d066c004d1fd26ae76a61303a7a18145 +0 -0
  130. data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  131. data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  132. data/spec/dummy/tmp/cache/assets/test/sprockets/fbce05c1fbdc18388ed134c8e4100ac8 +0 -0
  133. data/spec/generators/themes_on_rails/theme_generator_spec.rb +67 -0
  134. data/spec/lib/action_controller_spec.rb +45 -0
  135. data/spec/lib/assets_path_spec.rb +15 -0
  136. data/spec/lib/controller_additions_spec.rb +22 -0
  137. data/spec/spec_helper.rb +22 -0
  138. metadata +330 -0
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/404.html -->
52
+ <div class="dialog">
53
+ <h1>The page you were looking for doesn't exist.</h1>
54
+ <p>You may have mistyped the address or the page may have moved.</p>
55
+ </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
57
+ </body>
58
+ </html>
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/422.html -->
52
+ <div class="dialog">
53
+ <h1>The change you wanted was rejected.</h1>
54
+ <p>Maybe you tried to change something you didn't have access to.</p>
55
+ </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
57
+ </body>
58
+ </html>
@@ -0,0 +1,57 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/500.html -->
52
+ <div class="dialog">
53
+ <h1>We're sorry, but something went wrong.</h1>
54
+ </div>
55
+ <p>If you are the application owner check the logs for more information.</p>
56
+ </body>
57
+ </html>
File without changes
@@ -0,0 +1,47 @@
1
+ require "spec_helper"
2
+
3
+ describe PostsController do
4
+ render_views
5
+
6
+ context "theme :professional_blue" do
7
+ it "renders with provided theme :professional_blue" do
8
+ get :index, theme: "professional_blue"
9
+
10
+ expect(response.body).to match(/<h1>Listing posts: professional_blue<\/h1>/)
11
+ end
12
+
13
+ it "renders with layout :professional_blue" do
14
+ get :index, theme: "professional_blue"
15
+
16
+ expect(response).to render_template("layouts/professional_blue")
17
+ end
18
+ end
19
+
20
+ context "theme :basic_blue" do
21
+ it "renders with provided theme :basic_blue" do
22
+ get :index, theme: "basic_blue"
23
+
24
+ expect(response.body).to match(/<h1>Listing posts: basic_blue<\/h1>/)
25
+ end
26
+
27
+ it "renders with layout :basic_blue" do
28
+ get :index, theme: "basic_blue"
29
+
30
+ expect(response).to render_template("layouts/basic_blue")
31
+ end
32
+ end
33
+
34
+ context "default views" do
35
+ it "renders with default views" do
36
+ get :new, theme: "basic_blue"
37
+
38
+ expect(response.body).to match(/<h1>New post<\/h1>/)
39
+ end
40
+
41
+ it "renders with layout :basic_blue" do
42
+ get :new, theme: "basic_blue"
43
+
44
+ expect(response).to render_template("layouts/application")
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,44 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ ENV["RAILS_ENV"] ||= 'test'
3
+ require File.expand_path("../../config/environment", __FILE__)
4
+ require 'rspec/rails'
5
+ require 'rspec/autorun'
6
+
7
+ # Requires supporting ruby files with custom matchers and macros, etc,
8
+ # in spec/support/ and its subdirectories.
9
+ Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
10
+
11
+ # Checks for pending migrations before tests are run.
12
+ # If you are not using ActiveRecord, you can remove this line.
13
+ ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
14
+
15
+ RSpec.configure do |config|
16
+ # ## Mock Framework
17
+ #
18
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
19
+ #
20
+ # config.mock_with :mocha
21
+ # config.mock_with :flexmock
22
+ # config.mock_with :rr
23
+
24
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
25
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
26
+
27
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
28
+ # examples within a transaction, remove the following line or assign false
29
+ # instead of true.
30
+ config.use_transactional_fixtures = true
31
+
32
+ # If true, the base class of anonymous controllers will be inferred
33
+ # automatically. This will be the default behavior in future versions of
34
+ # rspec-rails.
35
+ config.infer_base_class_for_anonymous_controllers = false
36
+
37
+ # Run specs in random order to surface order dependencies. If you find an
38
+ # order dependency and want to debug it, you can fix the order by providing
39
+ # the seed, which is printed after each run.
40
+ # --seed 1234
41
+ config.order = "random"
42
+ config.run_all_when_everything_filtered = true
43
+ config.treat_symbols_as_metadata_keys_with_true_values = true
44
+ end
@@ -0,0 +1,67 @@
1
+ require 'spec_helper'
2
+
3
+ # Generators are not automatically loaded by Rails
4
+ require 'generators/themes_on_rails/theme_generator'
5
+
6
+ describe ThemesOnRails::Generators::ThemeGenerator do
7
+ # Tell the generator where to put its output (what it thinks of as Rails.root)
8
+ destination File.expand_path("../../../../../spec/dummy/tmp", __FILE__)
9
+
10
+ before do
11
+ prepare_destination
12
+ run_generator %w(basic_blue)
13
+ end
14
+
15
+ it "exists `app/themes`" do
16
+ expect(file("app/themes")).to exist
17
+ end
18
+
19
+ it "exists `app/themes/basic_blue`" do
20
+ expect(file("app/themes/basic_blue")).to exist
21
+ end
22
+
23
+ it "exists `app/themes/basic_blue/assets/images/basic_blue`" do
24
+ expect(file("app/themes/basic_blue/assets/images/basic_blue")).to exist
25
+ end
26
+
27
+ it "exists `app/themes/basic_blue/assets/javascripts/basic_blue`" do
28
+ expect(file("app/themes/basic_blue/assets/javascripts/basic_blue")).to exist
29
+ end
30
+
31
+ it "exists `app/themes/basic_blue/assets/javascripts/basic_blue/all.js`" do
32
+ expect(file("app/themes/basic_blue/assets/javascripts/basic_blue/all.js")).to exist
33
+ end
34
+
35
+ it "exists `app/themes/basic_blue/assets/stylesheets/basic_blue`" do
36
+ expect(file("app/themes/basic_blue/assets/stylesheets/basic_blue")).to exist
37
+ end
38
+
39
+ it "exists `app/themes/basic_blue/assets/stylesheets/basic_blue/all.css`" do
40
+ expect(file("app/themes/basic_blue/assets/stylesheets/basic_blue/all.css")).to exist
41
+ end
42
+
43
+ context "layout file: haml" do
44
+ before(:all) {
45
+ Rails.configuration.app_generators.rails[:template_engine] = :haml
46
+ }
47
+ subject { file("app/themes/basic_blue/views/layouts/basic_blue.html.haml") }
48
+
49
+ it { should exist }
50
+ it { should contain(/\= stylesheet_link_tag \"basic_blue\/all\"/) }
51
+ it { should contain(/\= javascript_include_tag \"basic_blue\/all\"/) }
52
+ end
53
+
54
+ context "layout file: erb" do
55
+ before(:all) {
56
+ Rails.configuration.app_generators.rails[:template_engine] = :erb
57
+ }
58
+ after(:all) {
59
+ Rails.configuration.app_generators.rails[:template_engine] = :haml
60
+ }
61
+ subject { file("app/themes/basic_blue/views/layouts/basic_blue.html.erb") }
62
+
63
+ it { should exist }
64
+ it { should contain(/\= stylesheet_link_tag \"basic_blue\/all\"/) }
65
+ it { should contain(/\= javascript_include_tag \"basic_blue\/all\"/) }
66
+ end
67
+ end