Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flip mockito.dart with mockito_no_mirrors.dart #36

Closed
matanlurey opened this issue Sep 28, 2016 · 8 comments
Closed

Flip mockito.dart with mockito_no_mirrors.dart #36

matanlurey opened this issue Sep 28, 2016 · 8 comments
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@matanlurey
Copy link
Contributor

I think it would be worth it just to have package:mockito/mockito.dart not include mirrors.

The only extra function Mockito provides for mirrors users is spy:

dynamic spy(dynamic mock, dynamic spiedObject) {
  var mirror = reflect(spiedObject);
  setDefaultResponse(
      mock,
      () => new CannedResponse(null,
          (Invocation realInvocation) => mirror.delegate(realInvocation)));
  return mock;
}

I am not even sure there is usage of this and could be convinced to just remove it.

/cc @srawlins @TedSander

@srawlins
Copy link
Member

I like the idea of 2-stepping it.

  • 1.2.0: flip mockito{,_no_mirrors}.dart
  • 1.3.0: remove mirrors if we don't need it.

@matanlurey
Copy link
Contributor Author

+1 to 2-step. Just wanted the buy-in (I'll wait for Ted before starting)

@TedSander
Copy link
Contributor

Spy is actually used but not much just a couple of instances from the code I can see.

I think it isn't that much of a burden to keep it for now. I do agree we should flip the default.

@srawlins
Copy link
Member

No flipping the default?

@matanlurey
Copy link
Contributor Author

Closed on accident.

@matanlurey matanlurey reopened this Nov 22, 2016
@matanlurey
Copy link
Contributor Author

So this already was flipped in 2.0.0-dev - this needs to be merged internally.

@matanlurey matanlurey self-assigned this Nov 28, 2016
@matanlurey matanlurey added the P1 A high priority bug; for example, a single project is unusable or has many test failures label Nov 28, 2016
@matanlurey
Copy link
Contributor Author

I believe @srawlins is merging internally.

@matanlurey matanlurey assigned srawlins and unassigned matanlurey Jan 30, 2017
@srawlins
Copy link
Member

srawlins commented Feb 2, 2017

@matanlurey made the flip in 2.0.0-dev dc8ce18.

@srawlins srawlins closed this as completed Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

3 participants