Feature: Create layout As a developer I would like to define a layout In order to start a new project # @cmd_debug # @cmd_output Scenario: Existing layout Given a layout file named "new_layout.layout" exists with: """ layout :name do end """ When I run `pointrb new new_project --layout name` Then an information occured: """ [Information] Layout 'name' for project 'new_project' created. """ Scenario: layout with directory Given a layout file named "new_layout.layout" exists with: """ layout :name do directory 'new_directory' end """ When I run `pointrb new new_project --layout name` Then a directory named 'new_project/new_directory' should exist Scenario: layout with nested directory Given a layout file named "new_layout.layout" exists with: """ layout :name do directory 'new_directory' do directory 'subdirectory' do directory 'subdirectory' end end end """ When I run `pointrb new new_project --layout name` Then a directory named 'new_project/new_directory' exists with: |Objects | |subdirectory | |subdirectory/subdirectory| Scenario: layout with a file Given a layout file named "new_layout.layout" exists with: """ layout :new_layout do file 'new_file' do <<-EOF this is content this is content EOF end end """ When I run `pointrb new new_project --layout new_layout` Then a file named 'new_project/new_file' exists with: """ this is content this is content """ Scenario: layout with a file which is different from layout name Given a layout file named "new_layout.layout" exists with: """ layout :name do file 'new_file' do <<-EOF this is content this is content EOF end end """ When I run `pointrb new new_project --layout name` Then a file named 'new_project/new_file' exists with: """ this is content this is content """ Scenario: layout with syntax error Given a layout file named "new_layout.layout" exists with: """ garbage """ When I run `pointrb new new_project --layout name` Then an error occured: """ Syntax error in layout-file """