Cucumberex.Hooks.DSL (cucumberex v0.2.1)

Copy Markdown View Source

Hook definition DSL. Use in support files:

use Cucumberex.Hooks.DSL

before_ fn world -> Map.put(world, :db, start_db()) end

before_ "@smoke", fn world -> Map.put(world, :smoke, true) end

after_ fn world ->
  cleanup(world.db)
  world
end

around_ fn world, run ->
  result = run.(world)
  cleanup(world)
  result
end

before_all_ fn -> :ok end

after_all_ fn -> :ok end

Summary

Functions

after_(fun)

(macro)

after_(tags, fun)

(macro)

after_all_(fun)

(macro)

after_step_(fun)

(macro)

around_(fun)

(macro)

around_(tags, fun)

(macro)

before_(fun)

(macro)

before_(tags, fun)

(macro)

before_all_(fun)

(macro)

before_step_(fun)

(macro)

install_plugin_(fun)

(macro)

load_module(module, registry \\ Cucumberex.Hooks.Registry)