1 | require './setup'
|
2 |
|
3 | describe 'Inline Options', ->
|
4 | beforeEach ->
|
5 | @load '''
|
6 | # My guides
|
7 | hello
|
8 |
|
9 | # Styleguide options
|
10 | ### Head
|
11 | <script id="my-script" src="hello.js"></script>
|
12 | ### Body
|
13 | <div sg-content id="my-body">
|
14 | '''
|
15 |
|
16 | it 'no errors', ->
|
17 |
|
18 | it 'should remove config blocks', ->
|
19 | expect(@$('h2#styleguide-options')).have.length 0
|
20 |
|
21 | it 'should have not much', ->
|
22 | expect(@$('body').text().trim()).match /^My guides/
|
23 | expect(@$('body').text().trim()).match /hello$/
|
24 |
|
25 | it 'should render with correct body', ->
|
26 | expect(@$('#my-body')).have.length 1
|
27 |
|
28 | it 'should render with correct head', ->
|
29 | expect(@$('#my-script')).have.length 1
|