File Coverage

File:t/view-helpers.t
Coverage:100.0%

linestmtbrancondsubpodtimecode
1#!/usr/bin/env perl -w
2
1
1
1
104
10
11
use strict;
3
1
1
1
113
5
19
use Test::More tests => 6;
4
5
1
1
1
85
5
13
use Railsish::ViewHelpers;
6
7
1
8
like javascript_include_tag("foo"),
8    qr{<script .*src="/javascripts/foo.js"></script>};
9
10
1
13
like javascript_include_tag("foo.js"),
11    qr{<script .*src="/javascripts/foo.js"></script>};
12
13
1
14
like javascript_include_tag("/there/foo"),
14    qr{<script .*src="/there/foo.js"></script>};
15
16
1
13
like javascript_include_tag("/there/foo.js"),
17    qr{<script .*src="/there/foo.js"></script>};
18
19
1
13
like javascript_include_tag("http://there.com/foo.js"),
20    qr{<script .*src="http://there.com/foo.js"></script>};
21
22
1
15
like javascript_include_tag("http://there.com/foo"),
23    qr{<script .*src="http://there.com/foo"></script>};
24