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

Move to dynamic fixtures when testing. #4284

Closed
envygeeks opened this issue Dec 26, 2015 · 0 comments
Closed

Move to dynamic fixtures when testing. #4284

envygeeks opened this issue Dec 26, 2015 · 0 comments
Assignees
Labels
frozen-due-to-age stale Nobody stepped up to work on this issue.

Comments

@envygeeks
Copy link
Contributor

Right now we have a large set of static fixtures, which drags down our testing performance. Lets switch to single-shot dynamic fixtures, on some of our larger projects we have classes that setup fixtures dynamically and allow us to do stuff like this:

mocked_jekyll.with_base.write "index.md", <<-DATA
  Bad Data
DATA

mocked_jekyll.build
expect(mocked_jekyll.whatever).to eq "this"

You can chain after chain after chain to create a context for your test. This will speed up Jekyll slightly because now we aren't constantly processing large amounts of data, each fixture is guaranteed to be fresh, all testing context is inside of the test and it's easy to see what exactly we are testing.

@envygeeks envygeeks self-assigned this Dec 26, 2015
@envygeeks envygeeks modified the milestone: 3.1 Dec 26, 2015
@jekyllbot jekyllbot added the stale Nobody stepped up to work on this issue. label Jun 6, 2016
@jekyll jekyll locked and limited conversation to collaborators Jul 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age stale Nobody stepped up to work on this issue.
Projects
None yet
Development

No branches or pull requests

2 participants