Skip to content

Made some Model methods defined by defineProperty writable so they can be mocked#399

Merged
dresende merged 1 commit intodresende:masterfrom
picatic:writable-files
Dec 1, 2013
Merged

Made some Model methods defined by defineProperty writable so they can be mocked#399
dresende merged 1 commit intodresende:masterfrom
picatic:writable-files

Conversation

@interlock
Copy link
Contributor

Useful for functional testing and not integration testing when using orm2.

  • writable added to some model instance defineProperty calls, some properties were left alone because they were static or had unknown function (isShell for example)
  • added a model-remove test that currently only tests the writable aspect (there appears to be no direct test of this function, other than from the hooks tests)

…can be mocked by test suites in non-integration tests.

- writable added to some model instance defineProperty calls, some properties were left alone because they were static or had unknown function (isShell for example)
- added a model-remove test that currently only tests the writable aspect (there appears to be no direct test of this function, other than from the hooks tests)
@interlock
Copy link
Contributor Author

BTW, tests pass ;-)

@dresende
Copy link
Owner

dresende commented Dec 1, 2013

Thank you :)

dresende added a commit that referenced this pull request Dec 1, 2013
Made some Model methods defined by `defineProperty` writable so they can be mocked
@dresende dresende merged commit 79454be into dresende:master Dec 1, 2013
@interlock interlock deleted the writable-files branch December 1, 2013 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants