1 %%%-------------------------------------------------------------------
2 %%% @copyright (C) 2011, Erlware, LLC.
4 %%% Test the ability to generate a project programatically
6 %%% Created : 5 Sep 2011 by Eric Merritt <ericbmerritt@gmail.com>
7 %%%-------------------------------------------------------------------
8 -module(sint_programatic_gen
).
10 -export([given
/3, 'when'/3, then
/3]).
12 % Step definitions for the sample calculator Addition feature.
14 given([an
, empty
, temp
, directory
, with
, no
, project
], _State
,
16 BaseDir
= ec_file:mkdtemp(),
19 'when'([gen
, is
, called
, pragmatically
, with
, out
,
20 available
, user
, input
], BaseDir
, _
) ->
21 ProjectName
= "super_foo",
23 sint_test_project_gen:single_app_project(BaseDir
, ProjectName
),
24 {ok
, {ProjectDir
, ProjectName
}};
25 'when'([a
, build
, is
, run
], State
= {ProjectDir
, _ProjectName
}, _
) ->
26 sinan:run_sinan(["-s", ProjectDir
, "build"]),
29 then([sinan
, should
, build
, the
, project
, normally
],
30 {ProjectDir
, ProjectName
}, _
) ->
31 sint_test_project_gen:validate_single_app_project(ProjectDir
, ProjectName
).