Sha256: b70764c996f0b19b216b3a7674e51c20d133bf19d5c94a1b7993c65d250ba8be
Contents?: true
Size: 872 Bytes
Versions: 3
Compression:
Stored size: 872 Bytes
Contents
%w{ hpricot murlsh }.each { |m| require m } describe Murlsh::Doc do context 'when html has everything' do subject do html = <<eos <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="description" content="the description" /> <title>the title</title> </head> <body> <h1>hi</h1> </body> </html> eos Hpricot(html).extend(Murlsh::Doc) end its(:charset) { should == 'utf-8' } its(:title) { should == 'the title' } its(:description) { should == 'the description' } end context 'when html has nothing' do subject do html = <<eos <html> <head> </head> <body> <h1>hi</h1> </body> </html> eos Hpricot(html).extend(Murlsh::Doc) end its(:charset) { should be_nil } its(:title) { should be_nil } its(:description) { should be_nil } end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
murlsh-1.0.0 | spec/doc_spec.rb |
murlsh-0.11.0 | spec/doc_spec.rb |
murlsh-0.10.0 | spec/doc_spec.rb |