File Coverage

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

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