@@ -2,18 +2,18 @@ describe("appURLToPath", function () {
2
2
var appURLPath ;
3
3
4
4
beforeEach ( function ( ) {
5
- appURLPath = Titanium . App . appURLToPath ( "app://index.html" ) ;
5
+ appURLPath = Ti . App . appURLToPath ( "app://index.html" ) ;
6
6
} ) ;
7
7
8
8
it ( "return a valid absolute file path for an app URL" , function ( ) {
9
- var file = Titanium . Filesystem . getFile ( appURLPath ) ;
9
+ var file = Ti . Filesystem . getFile ( appURLPath ) ;
10
10
expect ( file . exists ( ) ) . toBe ( true ) ;
11
11
} ) ;
12
12
13
13
it ( "returns a valid path even if the URL has a host in it" , function ( ) {
14
14
// See Lighthouse ticket #90 for more details.
15
- var appURLWithHost = Titanium . UI . getCurrentWindow ( ) . getURL ( ) ,
16
- appURLPathWithHost = Titanium . App . appURLToPath ( appURLWithHost ) ;
15
+ var appURLWithHost = Ti . UI . getCurrentWindow ( ) . getURL ( ) ,
16
+ appURLPathWithHost = Ti . App . appURLToPath ( appURLWithHost ) ;
17
17
expect ( appURLPathWithHost ) . toEqual ( appURLPath ) ;
18
18
} ) ;
19
19
} ) ;
@@ -23,33 +23,33 @@ xdescribe("exit", function () {});
23
23
24
24
describe ( "getArguments" , function ( ) {
25
25
it ( "should return two arguments" , function ( ) {
26
- expect ( Titanium . App . getArguments ( ) . length ) . toBe ( 2 ) ;
26
+ expect ( Ti . App . getArguments ( ) . length ) . toBe ( 2 ) ;
27
27
} ) ;
28
28
} ) ;
29
29
30
30
describe ( "getCopyright" , function ( ) {
31
31
it ( "returns the copyright specified in the tiapp.xml file" , function ( ) {
32
- expect ( Titanium . App . getCopyright ( ) ) . toEqual ( "2010 by Appcelerator" ) ;
32
+ expect ( Ti . App . getCopyright ( ) ) . toEqual ( "2010 by Appcelerator" ) ;
33
33
} ) ;
34
34
} ) ;
35
35
36
36
describe ( "getDescription" , function ( ) {
37
37
it ( "returns the description specified in the tiapp.xml file" , function ( ) {
38
- expect ( Titanium . App . getDescription ( ) ) . toEqual ( "A testing harness for Titanium " ) ;
38
+ expect ( Ti . App . getDescription ( ) ) . toEqual ( "A testing harness for Ti " ) ;
39
39
} ) ;
40
40
} ) ;
41
41
42
42
describe ( "getGUID" , function ( ) {
43
43
it ( "returns the application's GUID" , function ( ) {
44
- expect ( Titanium . App . getGUID ( ) ) . toEqual ( "5FDFCB8A-CD45-423F-BF0C-01B025A07D34" ) ;
44
+ expect ( Ti . App . getGUID ( ) ) . toEqual ( "5FDFCB8A-CD45-423F-BF0C-01B025A07D34" ) ;
45
45
} ) ;
46
46
} ) ;
47
47
48
48
describe ( "getHome" , function ( ) {
49
49
var appHomeDir ;
50
50
51
51
beforeEach ( function ( ) {
52
- appHomeDir = Titanium . Filesystem . getFile ( Titanium . App . getHome ( ) ) ;
52
+ appHomeDir = Ti . Filesystem . getFile ( Ti . App . getHome ( ) ) ;
53
53
} ) ;
54
54
55
55
it ( "provides the application home directory" , function ( ) {
@@ -66,31 +66,31 @@ xdescribe("getIcon", function () {});
66
66
67
67
describe ( "getName" , function ( ) {
68
68
it ( "returns the name of the application" , function ( ) {
69
- expect ( Titanium . App . getName ( ) ) . toEqual ( "Drillbit" ) ;
69
+ expect ( Ti . App . getName ( ) ) . toEqual ( "Drillbit" ) ;
70
70
} ) ;
71
71
} ) ;
72
72
73
73
describe ( "getPath" , function ( ) {
74
74
it ( "returns an absolute path to the application's executable" , function ( ) {
75
- var appPath = Titanium . App . getPath ( ) ;
76
- expect ( Titanium . Filesystem . getFile ( appPath ) . exists ( ) ) . toBe ( true ) ;
75
+ var appPath = Ti . App . getPath ( ) ;
76
+ expect ( Ti . Filesystem . getFile ( appPath ) . exists ( ) ) . toBe ( true ) ;
77
77
} ) ;
78
78
} ) ;
79
79
80
80
describe ( "getPublisher" , function ( ) {
81
81
it ( "returns the name of the publisher of this application" , function ( ) {
82
- expect ( Titanium . App . getPublisher ( ) ) . toEqual ( "Appcelerator" ) ;
82
+ expect ( Ti . App . getPublisher ( ) ) . toEqual ( "Appcelerator" ) ;
83
83
} ) ;
84
84
} ) ;
85
85
86
86
describe ( "getApplication" , function ( ) {
87
87
it ( "returns the URL of this application" , function ( ) {
88
- expect ( Titanium . App . getURL ( ) ) . toEqual ( "appcelerator.com" ) ;
88
+ expect ( Ti . App . getURL ( ) ) . toEqual ( "appcelerator.com" ) ;
89
89
} ) ;
90
90
} ) ;
91
91
92
92
describe ( "getVersion" , function ( ) {
93
93
it ( "returns the version of the application" , function ( ) {
94
- expect ( Titanium . App . getVersion ( ) ) . toEqual ( "1.0" ) ;
94
+ expect ( Ti . App . getVersion ( ) ) . toEqual ( "1.0" ) ;
95
95
} ) ;
96
96
} ) ;
0 commit comments