Setting defaultMode on Recorder has no effect #56

Closed
erdi opened this Issue Jul 27, 2012 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

erdi commented Jul 27, 2012

given a rule:

@Rule Recorder recorder = new Recorder(defaultMode: READ_ONLY)

I still see that tapes are created for tests if a request doesn't match any of those in the tape

Collaborator

robfletcher commented Aug 13, 2012

This is because of a really annoying limitation of annotation types. An enum property cannot default to null. This means that even if you don't specify the mode property on your annotation it will get set to READ_WRITE because that's the default on the annotation class. If no default is specified then you have to explicitly set it on the annotation. Not sure what, if anything, I can do to get round this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment