1 | require './setup'
|
2 |
|
3 | describe 'Prefix', ->
|
4 | describe 'in options', ->
|
5 | beforeEach ->
|
6 | @load "## Hello\n### world\nthere", prefix: "styleguide", head: ''
|
7 |
|
8 | it 'classnames in stuff', ->
|
9 | expect(@$("h2").is('.styleguide')).be.true
|
10 | expect(@$("p").is('.styleguide')).be.true
|
11 |
|
12 | it 'classnames in body', ->
|
13 | expect(@$("html").is('.styleguide')).be.true
|
14 | expect(@$("body").is('.styleguide')).be.true
|
15 |
|
16 | it 'h2 section', ->
|
17 | expect(@$('.styleguide-section-hello')).have.length 1
|
18 |
|
19 | it 'h3 section', ->
|
20 | expect(@$('.styleguide-section-world')).have.length 1
|
21 |
|
22 | it 'section', ->
|
23 | expect(@$('.styleguide-section')).have.length 1
|
24 |
|
25 | it 'block', ->
|
26 | expect(@$('.styleguide-block')).have.length 1
|
27 |
|
28 | describe 'inline options', ->
|
29 | beforeEach ->
|
30 | @load "## Hello\n###world\nthere\n\n# Styleguide options\n\n* prefix: styleguide", head: ''
|
31 |
|
32 | it 'classnames in stuff', ->
|
33 | expect(@$("h2").is('.styleguide')).be.true
|
34 | expect(@$("p").is('.styleguide')).be.true
|
35 |
|
36 | it 'classnames in body', ->
|
37 | expect(@$("html").is('.styleguide')).be.true
|
38 | expect(@$("body").is('.styleguide')).be.true
|
39 |
|
40 | it 'h2 section', ->
|
41 | expect(@$('.styleguide-section-hello')).have.length 1
|
42 |
|
43 | it 'h3 section', ->
|
44 | expect(@$('.styleguide-section-world')).have.length 1
|
45 |
|
46 | it 'section', ->
|
47 | expect(@$('.styleguide-section')).have.length 1
|
48 |
|
49 | it 'block', ->
|
50 | expect(@$('.styleguide-block')).have.length 1
|
51 |
|