<blockquote class="quote light-black dark-border-color"><div class="quote light-border-color">
<div class="quote-author" style="font-weight: bold;">Andreas Axelsson-2 wrote:</div>
<div class="quote-message">
> > Does the plain text story framework support teardowns? There doesn't
> seem to
> > be anywhere to put an "after" method.
>For now I'd stick this in a Given that
> you use at the beginning of each scenario, for example:
>
> Given "the stash is in a clean state" do
> # yank any old residual gunk here
> end
</div>
</div></blockquote>
Another option, which I found more helpful, is to add another step like:
<pre> And finally, clean up </pre>
Which enables you to do all the teardown in:
<pre> Then "finally, clean up" do{ teardown_stuff }</pre>
-J
<br><hr align="left" width="300">
View this message in context: <a href="http://www.nabble.com/Story-teardowns--tp14752945p15633065.html">Re: Story teardowns?</a><br>
Sent from the <a href="http://www.nabble.com/rspec-users-f17460.html">rspec-users mailing list archive</a> at Nabble.com.<br>