You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Konacha, which allows you to run Mocha in Rails apps, we need to set up a beforeEach callback (code). Right now this is done by calling beforeEach. But this requires that the 'bdd' interface is used.
This means that Konacha users cannot pick a different interface, because then the beforeEach handler doesn't work anymore.
Instead of adding support for all interfaces to Konacha, I would like to suggest that there could be a simple unified API under the mocha namespace, which would work regardless of the interface chosen. Perhaps all interfaces could actually be implemented using this API.
What do you think?
The text was updated successfully, but these errors were encountered:
sounds reasonable to me, what we need then is a better way to expose the suites, because this already exists (suites[0].beforeEach(fn);) is the impl of beforeEach for the BDD interface for example
In Konacha, which allows you to run Mocha in Rails apps, we need to set up a
beforeEach
callback (code). Right now this is done by callingbeforeEach
. But this requires that the 'bdd' interface is used.This means that Konacha users cannot pick a different interface, because then the
beforeEach
handler doesn't work anymore.Instead of adding support for all interfaces to Konacha, I would like to suggest that there could be a simple unified API under the
mocha
namespace, which would work regardless of the interface chosen. Perhaps all interfaces could actually be implemented using this API.What do you think?
The text was updated successfully, but these errors were encountered: