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

Fixtures #31

Closed
marcoxa opened this Issue Jun 17, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@marcoxa

marcoxa commented Jun 17, 2016

Hi guys,

do you have an example of how to actually use fixtures in FiveAM?

Ciao

Marco

@sionescu

This comment has been minimized.

Show comment
Hide comment
@sionescu

sionescu Jun 20, 2016

Owner

I'm afraid fixtures are not the best designed feature if FiveAM. In practice, I think it's simpler to just use a macro.

Owner

sionescu commented Jun 20, 2016

I'm afraid fixtures are not the best designed feature if FiveAM. In practice, I think it's simpler to just use a macro.

@marcoxa

This comment has been minimized.

Show comment
Hide comment
@marcoxa

marcoxa Jun 21, 2016

I think I figured out the problem I was having.

Essentially the documentation is misleading. DEF-FIXTURE does not define a "macro", but the body of a "function" where &BODY (*) is available as a MACROLET to include the TEST/DEF-TEST expressions.

My problem was that I was treating DEF-FIXTURE as a macro, trying to produce code. It is not. removing the backquote I was using fixed all my problems.

Changing the documentation would make things easier to understand.

Marco

(*) Changing the &BODY MACROLET name would also help.

marcoxa commented Jun 21, 2016

I think I figured out the problem I was having.

Essentially the documentation is misleading. DEF-FIXTURE does not define a "macro", but the body of a "function" where &BODY (*) is available as a MACROLET to include the TEST/DEF-TEST expressions.

My problem was that I was treating DEF-FIXTURE as a macro, trying to produce code. It is not. removing the backquote I was using fixed all my problems.

Changing the documentation would make things easier to understand.

Marco

(*) Changing the &BODY MACROLET name would also help.

@sionescu sionescu closed this Feb 13, 2018

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