thefrontside / ember-let

Create variable bindings inside your handlebars templates
MIT License
52 stars 16 forks source link

remove `andThen` helper #10

Closed cowboyd closed 8 years ago

cowboyd commented 8 years ago

BDD style encourages the explicit separation of actions and consequences. Actions are initiated in the beforeEach blocks associated with the describe describing the action, and consequences are verified inside the it block.

The general rule is that it should have no side-effects.

taras commented 8 years ago

I'm testing for precondition, click on a button and check the result. How would that work in this setup?

cowboyd commented 8 years ago

Something like this perhaps?

https://github.com/thefrontside/ember-let/blob/bd1a38d59da9ef2efdab298a3cb1f2107eadbc71/tests/acceptance/let-helper-test.js#L37-L51

taras commented 8 years ago

@cowboyd it's a little verbose, but let's merge it in so I can rebase my branch against it.

cowboyd commented 8 years ago

It's actually less verbose if you have more than one assertion, and I think that one less API to work with means a simpler model.