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

Improve test suite #271

Closed
2 tasks done
wojtekmach opened this issue Mar 23, 2016 · 6 comments
Closed
2 tasks done

Improve test suite #271

wojtekmach opened this issue Mar 23, 2016 · 6 comments

Comments

@wojtekmach
Copy link
Member

wojtekmach commented Mar 23, 2016

Per conversation on #265 (comment) there're a few things we could do to clean up the test suite:

  • return common records from the setup hook instead of fetching them in each example. E.g.: test "release docs", %{user: user} do
  • consider using some sort of factory library for generating test data
@wojtekmach
Copy link
Member Author

@ericmj I created this issue so that I don't forget about it :) Feel free to drop ideas how to improve the test suite even further

@mkaszubowski
Copy link
Contributor

mkaszubowski commented Jun 13, 2016

@wojtekmach Do you have any preference for the factory library? https://github.com/thoughtbot/ex_machina and https://github.com/batate/blacksmith both look good, I could introduce it to the tests if that's ok with you.

@wojtekmach
Copy link
Member Author

I haven't used either of these so not sure. Also, it's really @ericmj's call :)

@wojtekmach
Copy link
Member Author

wojtekmach commented Dec 8, 2016

@ericmj re factory: since the fresh off-the-press "What's new in ecto 2.0" chapters suggests that in many cases using just ecto 2 is good enough (as opposed to bringing in another dep) I think we should give it a go :) wdyt?

@ericmj
Copy link
Member

ericmj commented Dec 9, 2016

I talked with @wojtekmach and we decided we can go ahead without a factory library but we should continue moving model creation to the setup callback and we should generate random data for the models so that we still get test concurrency from postgres.

@ericmj
Copy link
Member

ericmj commented Mar 11, 2017

I have started work on this if you look at the latest commits in master. More work has to be done but I think we can close because improving the test suite will be an ongoing job.

@ericmj ericmj closed this as completed Mar 11, 2017
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

3 participants