anchor.diff:  
   
   init_per_testcase(_, Config) ->
  -    file:make_dir("ebin"),
  -    file:make_dir("scenarios"),
  -    
  -    application:ensure_all_started(inets),
  -    application:ensure_all_started(amoc),
  +    ok = file:make_dir("ebin"),
  +    ok = file:make_dir(?SCENARIOS_DIR_S),
  +    {ok, _} = application:ensure_all_started(inets),
  +    {ok, _} = application:ensure_all_started(amoc),
       Config.
   
   end_per_testcase(post_scenarios_returns_200_and_when_scenario_valid, _Config) ->
  -    file:delete("ebin/sample_test.beam"),
  -    file:delete("scenarios/sample_test.erl"),
  -    
  -    file:del_dir("ebin"),
  -    file:del_dir("scenarios"),
  -
  -    application:stop(inets),
  -    application:stop(amoc);
  +    ok = file:delete(filename:join(["ebin",
  +                                    ?SAMPLE_SCENARIO_BEAM_S])),
  +    ok = file:delete(filename:join([?SCENARIOS_DIR_S,
  +                                    ?SAMPLE_SCENARIO_S])),
  +    ok = file:del_dir("ebin"),
  +    ok = file:del_dir(?SCENARIOS_DIR_S);
   
   end_per_testcase(_, _Config) ->
  -    application:stop(inets),
  -    application:stop(amoc).
  +    ok = file:del_dir("ebin"),
  +    ok = file:del_dir(?SCENARIOS_DIR_S).
   
   get_scenarios_returns_200_and_scenarios_list_when_requested(_Config) ->
       %% given
  -    URL = get_url() ++ "/scenarios", 
  +    URL = get_url() ++ ?SCENARIOS_URL_S,
       %% when
       {CodeHttp, Body} = get_request(URL),
       Scenarios = proplists:get_value(<<"scenarios">>, Body),
  
positive.code: 
  post_scenarios_returns_400_when_malformed_request(_Config) ->
      %% given
      URL = get_url() ++ "/scenarios",
      RequestBody = jsx:encode([{keyname_typo, sample_test}]),
      %% when
      {CodeHttp, Body} = post_request(URL, RequestBody),
      %% then
  
negative.code: 
  post_scenarios_returns_200_and_compile_error_when_scenario_source_not_valid(_Config) ->
      %% given
      URL = get_url() ++ ?SCENARIOS_URL_S,
      RequestBody = jsx:encode([
                                {scenario, ?SAMPLE_SCENARIO_A},
                                {module_source, invalid_source}
                               ]),
      %% when
      {CodeHttp, Body} = post_request(URL, RequestBody),
      ScenarioFileSource = filename:join([?SCENARIOS_DIR_S,
                                          ?SAMPLE_SCENARIO_S]),
      %% then
      ?assertNot(filelib:is_regular(ScenarioFileSource)),
      ?assertEqual(200, CodeHttp),
      ?assertEqual([{<<"compile">>, <<"error">>}],
                   Body).
  
  post_scenarios_returns_200_and_when_scenario_valid(Config) ->
      %% given
      URL = get_url() ++ ?SCENARIOS_URL_S,
      ScenarioFile = data(Config, ?SAMPLE_SCENARIO_S),
      {ok, ScenarioContent} = file:read_file(ScenarioFile),
      RequestBody = jsx:encode([
                                {scenario, ?SAMPLE_SCENARIO_A},
                                {module_source, ScenarioContent}
                               ]),
      %% when
      {CodeHttp, Body} = post_request(URL, RequestBody),
      ScenarioFileSource = filename:join([?SCENARIOS_DIR_S,
                                          ?SAMPLE_SCENARIO_S]),
      ScenarioFileBeam = filename:join(["ebin",
                                        ?SAMPLE_SCENARIO_BEAM_S]),
      %% then
      ?assertEqual(200, CodeHttp),
      ?assert(filelib:is_regular(ScenarioFileSource)),
      ?assert(filelib:is_regular(ScenarioFileBeam)),
      ?assertEqual([{<<"compile">>, <<"ok">>}],
                   Body).
  
  