Merge branch 'test_instead_of_unittest' of https://github.com/bwu-dart-contributing/dart-mockito into bwu-dart-contributing-test_instead_of_unittest
diff --git a/.gitignore b/.gitignore
index c41da4f..de70948 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,5 +10,8 @@
*.js.deps
*.js.map
+# IDE
+.idea/
+
# Include when developing application packages.
pubspec.lock
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..ca63bc0
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,4 @@
+## 0.9.0
+
+* Migrate from the unittest package to use the new test package.
+* Format code using dartformat
diff --git a/README.md b/README.md
index 4932fd8..a1617a5 100644
--- a/README.md
+++ b/README.md
@@ -20,10 +20,10 @@
void sleep(){}
int lives = 9;
}
-
+
//Mock class
class MockCat extends Mock implements Cat{}
-
+
//mock creation
var cat = new MockCat();
```
@@ -44,7 +44,7 @@
//stubbing - before execution
when(cat.sound()).thenReturn("Purr");
expect(cat.sound(), "Purr");
- //you can call it again
+ //you can call it again
expect(cat.sound(), "Purr");
//let's change stub
when(cat.sound()).thenReturn("Meow");
@@ -53,7 +53,7 @@
when(cat.lives).thenReturn(9);
expect(cat.lives, 9);
```
-
+
By default, for all methods that return value, mock returns null.
Stubbing can be overridden: for example common stubbing can go to fixture setup but the test methods can override it. Please note that overridding stubbing is a potential code smell that points out too much stubbing.
Once stubbed, the method will always return stubbed value regardless of how many times it is called.
diff --git a/pubspec.yaml b/pubspec.yaml
index 6728a52..f576845 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,11 +1,11 @@
name: mockito
-version: 0.8.2
+version: 0.9.0
author: Dmitriy Fibulwinter <fibulwinter@gmail.com>
description: A mock framework inspired by Mockito.
homepage: https://github.com/fibulwinter/dart-mockito
environment:
sdk: '>=1.0.0 <2.0.0'
dependencies:
- matcher: '>=0.10.0 <1.0.0'
+ matcher: '>=0.12.0 <1.0.0'
dev_dependencies:
- test: '>=0.11.0 <1.0.0'
+ test: '>=0.12.0 <1.0.0'
diff --git a/test/mockitoSpec.dart b/test/mockito_test.dart
similarity index 99%
rename from test/mockitoSpec.dart
rename to test/mockito_test.dart
index d693e07..4d61b62 100644
--- a/test/mockitoSpec.dart
+++ b/test/mockito_test.dart
@@ -1,5 +1,5 @@
import 'package:test/test.dart';
-import '../lib/mockito.dart';
+import 'package:mockito/mockito.dart';
class RealClass {
String methodWithoutArgs() => "Real";