make the ios development path less mandatory

This commit is contained in:
Devon Carew
2016-02-16 18:23:43 -08:00
parent c30b3cc69b
commit 7ae6f7f391
11 changed files with 367 additions and 6 deletions

View File

@@ -3,10 +3,13 @@
// found in the LICENSE file.
import 'dart:async';
import 'dart:io';
import 'package:flutter_tools/src/base/context.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/device.dart';
import 'package:flutter_tools/src/doctor.dart';
import 'package:flutter_tools/src/ios/mac.dart';
import 'package:test/test.dart';
/// Return the test logger. This assumes that the current Logger is a BufferLogger.
@@ -29,6 +32,14 @@ void testUsingContext(String description, dynamic testMethod(), {
if (!overrides.containsKey(DeviceManager))
testContext[DeviceManager] = new MockDeviceManager();
if (!overrides.containsKey(Doctor))
testContext[Doctor] = new Doctor();
if (Platform.isMacOS) {
if (!overrides.containsKey(XCode))
testContext[XCode] = new XCode();
}
return testContext.runInZone(testMethod);
}, timeout: timeout);
}