@@ -16,16 +16,16 @@ describe('rcs file replace', () => {
16
16
17
17
describe ( 'replaceCss' , ( ) => {
18
18
it ( 'should return the modified css file' , done => {
19
- rcs . fileReplace . replaceCss ( fixturesCwd + '/style.css' , ( err , data ) => {
19
+ rcs . replace . fileCss ( fixturesCwd + '/style.css' , ( err , data ) => {
20
20
expect ( data . data ) . to . equal ( fs . readFileSync ( resultsCwd + '/style.css' , 'utf8' ) ) ;
21
21
22
22
done ( ) ;
23
23
} ) ;
24
24
} ) ;
25
25
26
26
it ( 'should modify the second one with the values from the first' , done => {
27
- rcs . fileReplace . replaceCss ( fixturesCwd + '/style.css' , ( err , data ) => {
28
- rcs . fileReplace . replaceCss ( fixturesCwd + '/style2.css' , ( err , data ) => {
27
+ rcs . replace . fileCss ( fixturesCwd + '/style.css' , ( err , data ) => {
28
+ rcs . replace . fileCss ( fixturesCwd + '/style2.css' , ( err , data ) => {
29
29
expect ( data . data ) . to . equal ( fs . readFileSync ( resultsCwd + '/style2.css' , 'utf8' ) ) ;
30
30
31
31
done ( ) ;
@@ -34,7 +34,7 @@ describe('rcs file replace', () => {
34
34
} ) ;
35
35
36
36
it ( 'should fail' , done => {
37
- rcs . fileReplace . replaceCss ( 'non/exisiting/path.css' , ( err , data ) => {
37
+ rcs . replace . fileCss ( 'non/exisiting/path.css' , ( err , data ) => {
38
38
expect ( err ) . to . be . an ( 'object' ) ;
39
39
expect ( err . error ) . to . equal ( 'ENOENT' ) ;
40
40
@@ -45,7 +45,7 @@ describe('rcs file replace', () => {
45
45
46
46
describe ( 'replace any file' , ( ) => {
47
47
it ( 'should fail' , done => {
48
- rcs . fileReplace . replace ( 'non/exisiting/path.css' , ( err , data ) => {
48
+ rcs . replace . file ( 'non/exisiting/path.css' , ( err , data ) => {
49
49
expect ( err ) . to . be . an ( 'object' ) ;
50
50
expect ( err . error ) . to . equal ( 'ENOENT' ) ;
51
51
@@ -54,8 +54,8 @@ describe('rcs file replace', () => {
54
54
} ) ;
55
55
56
56
it ( 'should return the modified html file' , done => {
57
- rcs . fileReplace . replaceCss ( fixturesCwd + '/style.css' , ( err , data ) => {
58
- rcs . fileReplace . replace ( fixturesCwd + '/index.html' , ( err , data ) => {
57
+ rcs . replace . fileCss ( fixturesCwd + '/style.css' , ( err , data ) => {
58
+ rcs . replace . file ( fixturesCwd + '/index.html' , ( err , data ) => {
59
59
expect ( data . data ) . to . equal ( fs . readFileSync ( resultsCwd + '/index.html' , 'utf8' ) ) ;
60
60
61
61
done ( ) ;
@@ -65,8 +65,8 @@ describe('rcs file replace', () => {
65
65
66
66
it ( 'should return the modified js file' , done => {
67
67
// `js` file imported as `txt` to avoid having mocha-phantomjs
68
- rcs . fileReplace . replaceCss ( fixturesCwd + '/style.css' , ( err , data ) => {
69
- rcs . fileReplace . replace ( fixturesCwd + '/main.txt' , ( err , data ) => {
68
+ rcs . replace . fileCss ( fixturesCwd + '/style.css' , ( err , data ) => {
69
+ rcs . replace . file ( fixturesCwd + '/main.txt' , ( err , data ) => {
70
70
expect ( data . data ) . to . equal ( fs . readFileSync ( resultsCwd + '/main.txt' , 'utf8' ) ) ;
71
71
72
72
done ( ) ;
0 commit comments