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

Automatically generated mock data files #1345

Open
HCLarsen opened this issue Oct 23, 2023 · 0 comments
Open

Automatically generated mock data files #1345

HCLarsen opened this issue Oct 23, 2023 · 0 comments

Comments

@HCLarsen
Copy link
Contributor

This would operate similar to Rails' fixture folder, with the generator creating a file for each model generated, and those models being automatically included in the test files, to be easily used in tests.

In Rails, this file takes the form of yaml, with two mock objects, like so:

david:
  name: David Heinemeier Hansson
  birthday: 1979-10-15
  profession: Systems development

steve:
  name: Steve Ross Kellock
  birthday: 1974-09-27
  profession: guy with keyboard

And they're included with a method with the same name as the model.

users(:david)

We don't necessarily have to use the same syntax as Rails, but something just as easy to use, or easier, would be a great benefit to those of us who wish to use TDD with our Amber apps.

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

No branches or pull requests

2 participants