Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions lib/src/builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1270,9 +1270,7 @@ class _MockClassInfo {
'/// See the documentation for Mockito\'s code generation '
'for more information.',
);
if (classIsImmutable) {
cBuilder.docs.add('// ignore: must_be_immutable');
}

// For each type parameter on [classToMock], the Mock class needs a type
// parameter with same type variables, and a mirrored type argument for
// the "implements" clause.
Expand Down
14 changes: 0 additions & 14 deletions test/builder/auto_mocks_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3784,20 +3784,6 @@ void main() {
);
});

test('adds ignore: must_be_immutable analyzer comment if mocked class is '
'immutable', () async {
await expectSingleNonNullableOutput(
dedent(r'''
import 'package:meta/meta.dart';
@immutable
class Foo {
void foo();
}
'''),
_containsAllOf('// ignore: must_be_immutable\nclass MockFoo'),
);
});

group('typedef mocks', () {
group('are generated properly', () {
test('when aliased type parameters are instantiated', () async {
Expand Down
Loading