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

Invoking a topic each time a vow is run. #213

Open
maccman opened this issue May 10, 2012 · 3 comments
Open

Invoking a topic each time a vow is run. #213

maccman opened this issue May 10, 2012 · 3 comments
Labels
enhancement The software would be more useful if it did more

Comments

@maccman
Copy link

maccman commented May 10, 2012

We're running into the issue concerning the fact that the topic is only run once per vow. Having it run before each vow is pretty useful, for example reseting state after a vow is run.

I'm quite happy to submit a pull request for this, but I thought I'd first check to see if it's something that's likely to get in - or if this behavior is an intentional architectural decision.

@indexzero
Copy link

@maccman Can you be more specific about the usage? In these scenarios I've simply written small macros which generate the vows structure it is expecting. It's not ideal, but changes to the vows grammar can be tricky. For example in this case:

  • How would one specify if a topic is to be run every time vs. once per vow?

@egorse
Copy link

egorse commented May 18, 2012

What for its really needed?

topic: new function() {
  return new SomeObject();
},
'vow 1': function(f) {
  assert.isObject(f());
},
'vow 2': function(f) {
  assert.isNumber(f().getBananas());
} 

@evanp evanp added enhancement The software would be more useful if it did more and removed feature-request labels Apr 27, 2018
@evanp
Copy link
Contributor

evanp commented Apr 27, 2018

This seems complicated. Is the idea that the tests are mutating the topic?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The software would be more useful if it did more
Projects
None yet
Development

No branches or pull requests

4 participants