Skip to content

Commit

Permalink
Update mock-fs
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaub committed Jan 11, 2014
1 parent ca44450 commit ba0fb3f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"wrench": "1.5.4",
"tmp": "0.0.21",
"grunt-contrib-clean": "0.5.0",
"mock-fs": "1.0.0"
"mock-fs": "2.x"
},
"peerDependencies": {
"grunt": "~0.4.1"
Expand Down
21 changes: 6 additions & 15 deletions test/lib/util.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ describe('util', function() {

describe('filterPathsByTime()', function() {

var restore;
beforeEach(function() {
restore = mock({
mock({
src: {
js: {
'a.js': mock.file({
Expand All @@ -26,9 +25,7 @@ describe('util', function() {
}
});
});
afterEach(function() {
restore();
});
afterEach(mock.restore);

it('calls callback with files newer than provided time', function(done) {

Expand Down Expand Up @@ -67,9 +64,8 @@ describe('util', function() {

describe('anyNewer()', function() {

var restore;
beforeEach(function() {
restore = mock({
mock({
src: {
js: {
'a.js': mock.file({
Expand All @@ -85,9 +81,7 @@ describe('util', function() {
}
});
});
afterEach(function() {
restore();
});
afterEach(mock.restore);

var paths = [
'src/js/a.js',
Expand Down Expand Up @@ -127,9 +121,8 @@ describe('util', function() {

describe('filterFilesByTime()', function() {

var restore;
beforeEach(function() {
restore = mock({
mock({
src: {
js: {
'a.js': mock.file({
Expand Down Expand Up @@ -160,9 +153,7 @@ describe('util', function() {
}
});
});
afterEach(function() {
restore();
});
afterEach(mock.restore);

it('provides all files if any is newer than dest', function(done) {
var files = [{
Expand Down

0 comments on commit ba0fb3f

Please sign in to comment.