haml-edge 2.3.33 → 2.3.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/EDGE_GEM_VERSION +1 -1
- data/VERSION +1 -1
- data/test/haml/spec_test.rb +32 -0
- metadata +8 -5
data/EDGE_GEM_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.3.
|
|
1
|
+
2.3.34
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.3.
|
|
1
|
+
2.3.34
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
|
3
|
+
|
|
4
|
+
begin
|
|
5
|
+
require 'json'
|
|
6
|
+
rescue LoadError
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
class SpecTest < Test::Unit::TestCase
|
|
10
|
+
spec_file = File.dirname(__FILE__) + '/spec/tests.json'
|
|
11
|
+
if !File.exists?(spec_file)
|
|
12
|
+
warn <<MSG
|
|
13
|
+
Couldn't load haml-spec, skipping some tests.
|
|
14
|
+
To use haml-spec, run `git submodule update --init`
|
|
15
|
+
MSG
|
|
16
|
+
elsif !defined?(JSON)
|
|
17
|
+
warn "Couldn't load json, skipping some tests."
|
|
18
|
+
else
|
|
19
|
+
JSON.parse(File.read(spec_file)).each do |name, tests|
|
|
20
|
+
define_method("test_spec: #{name}") do
|
|
21
|
+
tests.each do |haml, html|
|
|
22
|
+
result = Haml::Engine.new(haml, :locals => [:var]).render(
|
|
23
|
+
Object.new,
|
|
24
|
+
:var => "value",
|
|
25
|
+
:first => "a",
|
|
26
|
+
:last => "z")
|
|
27
|
+
assert_equal(html, result.rstrip)
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: haml-edge
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.3.
|
|
4
|
+
version: 2.3.34
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nathan Weizenbaum
|
|
@@ -44,10 +44,10 @@ extensions: []
|
|
|
44
44
|
|
|
45
45
|
extra_rdoc_files:
|
|
46
46
|
- README.md
|
|
47
|
-
-
|
|
47
|
+
- VERSION
|
|
48
48
|
- CONTRIBUTING
|
|
49
49
|
- MIT-LICENSE
|
|
50
|
-
-
|
|
50
|
+
- REVISION
|
|
51
51
|
- VERSION_NAME
|
|
52
52
|
- EDGE_GEM_VERSION
|
|
53
53
|
files:
|
|
@@ -185,6 +185,8 @@ files:
|
|
|
185
185
|
- test/haml/templates/very_basic.haml
|
|
186
186
|
- test/haml/templates/whitespace_handling.haml
|
|
187
187
|
- test/haml/util_test.rb
|
|
188
|
+
- test/haml/spec
|
|
189
|
+
- test/haml/spec_test.rb
|
|
188
190
|
- test/linked_rails.rb
|
|
189
191
|
- test/sass
|
|
190
192
|
- test/sass/css2sass_test.rb
|
|
@@ -255,10 +257,10 @@ files:
|
|
|
255
257
|
- init.rb
|
|
256
258
|
- .yardopts
|
|
257
259
|
- README.md
|
|
258
|
-
-
|
|
260
|
+
- VERSION
|
|
259
261
|
- CONTRIBUTING
|
|
260
262
|
- MIT-LICENSE
|
|
261
|
-
-
|
|
263
|
+
- REVISION
|
|
262
264
|
- VERSION_NAME
|
|
263
265
|
- EDGE_GEM_VERSION
|
|
264
266
|
has_rdoc: true
|
|
@@ -300,6 +302,7 @@ test_files:
|
|
|
300
302
|
- test/haml/html2haml_test.rb
|
|
301
303
|
- test/haml/template_test.rb
|
|
302
304
|
- test/haml/util_test.rb
|
|
305
|
+
- test/haml/spec_test.rb
|
|
303
306
|
- test/sass/css2sass_test.rb
|
|
304
307
|
- test/sass/engine_test.rb
|
|
305
308
|
- test/sass/functions_test.rb
|