History

Add SQLite documentation

Thibaut Courouble committed 9 years ago

Commit 0c8ca4e1 parent be1390321 files · +332 −4Browse files

Showing the changes to test (1 of 21 files). Show all

Unified · Split

test/lib/docs/core/parser_test.rb+12−0
@@ -28,4 +28,16 @@ class DocsParserTest < MiniTest::Spec · 27 unmodified lines
2828 end
2929 end
3030 end
31+
32+ describe "#title" do
33+ it "returns nil when there is no <title>" do
34+ body = '<!doctype html><meta charset=utf-8><div>Test</div>'
35+ assert_nil parser(body).title
36+ end
37+
38+ it "returns the <title> when there is one" do
39+ body = '<!doctype html><meta charset=utf-8><title>Title</title><div>Test</div>'
40+ assert_equal 'Title', parser(body).title
41+ end
42+ end
3143 end