Skip to content

Commit

Permalink
refactor: update to Dart 3 and Very Good Analysis 5 (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
renancaraujo committed Jun 6, 2023
1 parent 668e835 commit 15981e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.3.0
homepage: https://github.com/VeryGoodOpenSource/pub_updater

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=3.0.0 <4.0.0"

dependencies:
http: ^1.0.0
Expand All @@ -17,4 +17,4 @@ dev_dependencies:
json_serializable: ^6.5.3
mocktail: ^0.3.0
test: ^1.17.0
very_good_analysis: ^4.0.0
very_good_analysis: ^5.0.0
6 changes: 2 additions & 4 deletions test/pub_update_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ class MockResponse extends Mock implements Response {}

class MockProcessManager extends Mock implements ProcessManager {}

class FakeProcessResult extends Fake implements ProcessResult {}

const emptyResponseBody = '{}';

const command = [
Expand Down Expand Up @@ -59,7 +57,7 @@ void main() {
when(() => response.body).thenReturn(validPackageInfoResponseBody);

when(() => processManager.run(any()))
.thenAnswer((_) => Future.value(FakeProcessResult()));
.thenAnswer((_) => Future.value(ProcessResult(42, 0, '', '')));
});

test('can be instantiated without an explicit http client', () {
Expand Down Expand Up @@ -155,7 +153,7 @@ void main() {
.thenReturn(preReleasePackageInfoResponseBody);

when(() => processManager.run(any()))
.thenAnswer((_) => Future.value(FakeProcessResult()));
.thenAnswer((_) => Future.value(ProcessResult(42, 0, '', '')));
});

test('returns false when currentVersion < latestVersion', () async {
Expand Down

0 comments on commit 15981e3

Please sign in to comment.