emcee 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,46 +4,35 @@ require 'action_controller'
4
4
  class DummyAppIntegrationTest < ActionController::TestCase
5
5
  tests DummyController
6
6
 
7
- test "should succesfully load the app and show index" do
8
- get :index
9
- assert_response :success
10
- end
11
-
12
- test "index should have html imports" do
13
- get :index
14
- assert_select "link[rel='import']"
15
- end
16
-
17
7
  test "the compiled assets should be served from the right directory" do
18
8
  get :index
19
9
  assert_match /href="\/assets\/application\.html"/, @response.body
20
10
  end
21
11
 
22
- # To test the contents of our compiled application.html, we have a custom route
23
- # and controller action. The controller action renders the compiled file as a
24
- # json response, which we can test against here.
25
- test "the test files should get concatenated" do
12
+ # The dummy app has a custom route and controller action that renders the
13
+ # compiled html import as a json response. We test against that here.
14
+ test "the test files should get compiled and concatenated" do
26
15
  get :assets
27
- assert_equal @response.body, <<-EOS
28
- <script>var life = "is good";
29
- </script>
30
- <p>test4</p>
31
- <style>p {
32
- color: red; }
33
- </style>
34
- <script>(function() {
35
- var hello;
36
- hello = \"world\";
37
- }).call(this);
38
- </script>
39
- <p>compiled scss and CoffeeScript</p>
40
- <style>p {
41
- color: pink;
42
- }
43
- </style>
44
- <p>test3</p>
45
- <p>test2</p>
46
- <p>test1</p>
47
- EOS
16
+ assert_equal @response.body, <<-EOS.strip_heredoc
17
+ <script>var life = "is good";
18
+ </script>
19
+ <p>test4</p>
20
+ <style>p {
21
+ color: red; }
22
+ </style>
23
+ <script>(function() {
24
+ var hello;
25
+ hello = "world";
26
+ }).call(this);
27
+ </script>
28
+ <p>compiled scss and CoffeeScript</p>
29
+ <style>p {
30
+ color: pink;
31
+ }
32
+ </style>
33
+ <p>test3</p>
34
+ <p>test2</p>
35
+ <p>test1</p>
36
+ EOS
48
37
  end
49
38
  end
@@ -6,8 +6,8 @@ require 'emcee/processors/stylesheet_processor'
6
6
  require 'coffee-rails'
7
7
  require 'sass'
8
8
 
9
- # Create a stub of Sprocket's Context class, so we can test if we're 'requiring'
10
- # assets correctly.
9
+ # Create a stub of Sprocket's Context class, so we can test if we're sending
10
+ # the correct messages to it.
11
11
  class ContextStub
12
12
  attr_reader :assets
13
13
 
@@ -75,30 +75,4 @@ class ProcessorsTest < ActiveSupport::TestCase
75
75
  <p>test</p>
76
76
  EOS
77
77
  end
78
-
79
- test "processing sass stylesheets should work" do
80
- @body.gsub!("test.css", "test.css.scss")
81
- processor = Emcee::StylesheetProcessor.new(@context)
82
- processed = processor.process(@body)
83
-
84
- assert_equal processed, <<-EOS.strip_heredoc
85
- <link rel="import" href="test.html">
86
- <style>/* contents */</style>
87
- <script src="test.js"></script>
88
- <p>test</p>
89
- EOS
90
- end
91
-
92
- test "processing CoffeeScript should work" do
93
- @body.gsub!("test.js", "test.js.coffee")
94
- processor = Emcee::ScriptProcessor.new(@context)
95
- processed = processor.process(@body)
96
-
97
- assert_equal processed, <<-EOS.strip_heredoc
98
- <link rel="import" href="test.html">
99
- <link rel="stylesheet" href="test.css">
100
- <script>/* contents */</script>
101
- <p>test</p>
102
- EOS
103
- end
104
78
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emcee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Huth
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-28 00:00:00.000000000 Z
11
+ date: 2014-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -103,6 +103,7 @@ files:
103
103
  - lib/emcee/version.rb
104
104
  - lib/generators/emcee/install/install_generator.rb
105
105
  - lib/generators/emcee/install/templates/application.html
106
+ - lib/generators/emcee/install/templates/template.bowerrc
106
107
  - test/compressors_test.rb
107
108
  - test/dummy/README.rdoc
108
109
  - test/dummy/Rakefile