ruhl 0.11.1 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.1
1
+ 0.11.2
@@ -0,0 +1,10 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <title>Hello World</title>
5
+ </head>
6
+ <body>
7
+ <p>Here is a space&nbsp;and another&nbsp;one.</p>
8
+ <p>RuHL &copy; 2009</p>
9
+ </body>
10
+ </html>
data/spec/ruhl_spec.rb CHANGED
@@ -327,15 +327,39 @@ describe Ruhl do
327
327
  end
328
328
  end
329
329
 
330
+ describe "special.html" do
331
+ before do
332
+ @html = File.read html(:special)
333
+ @doc = create_doc
334
+ end
335
+
336
+ it "will convert entities" do
337
+ ps = @doc.xpath("/html/body//p")
338
+ ps[0].inner_html.should == "Here is a space&nbsp;and another&nbsp;one."
339
+ ps[1].inner_html.should == "RuHL &copy; 2009"
340
+ end
341
+ end
342
+
330
343
  describe "when no method" do
331
344
  before do
332
- @html = "<p data-ruhl='nonexistant_method'>I am bad</p>"#File.read html(:debug)
345
+ @html = "<p data-ruhl='nonexistant_method'>I am bad</p>"
333
346
  end
334
347
 
335
348
  it 'should complain' do
336
349
  lambda{ @doc = create_doc }.should raise_error(NoMethodError)
337
350
  end
338
351
  end
352
+
353
+ describe "when no partial" do
354
+ before do
355
+ @html = "<p data-ruhl='_partial: partial|no file'>I am bad</p>"#File.read html(:debug)
356
+ end
357
+
358
+ it 'should complain' do
359
+ lambda{ @doc = create_doc }.should raise_error(Ruhl::PartialNotFoundError)
360
+ end
361
+ end
362
+
339
363
  end
340
364
 
341
365
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruhl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Stone
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-27 00:00:00 -04:00
12
+ date: 2009-11-06 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -66,6 +66,7 @@ files:
66
66
  - spec/html/parameters.html
67
67
  - spec/html/seo.html
68
68
  - spec/html/sidebar.html
69
+ - spec/html/special.html
69
70
  - spec/html/use.html
70
71
  - spec/html/use_if.html
71
72
  - spec/rcov.opts