nicer mech integration #8

Open
benmmurphy opened this Issue Dec 26, 2011 · 0 comments

Projects

None yet

1 participant

@benmmurphy

we should have a thing that just automatically unloads all the mechs you have defined in a before or in an example.

for example

describe("foo", fun() ->
  before_each(fun() ->
    %load mech 1
  end),

  it("should do stuff", fun() ->
  end),

  describe("nested", fun() ->
    before_each(fun() ->
      % load mech 2
    end),
    it("should do more stuff", fun() ->
    end),
  end)
end)

is converted to

load mech 1
run "should do stuff"
unload mech 1

load mech 1
load mech 2
run "should do more stuff"
unload mech 2
unload mech 1

we should probably provide an option to auto-verify as well.

not sure if mech already has something to make this easy...

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