Sha256: 68880a8c7ccb43a19fdc780ac918435846f37952f3ef675b66726ab1df467ee9
Contents?: true
Size: 1.07 KB
Versions: 5
Compression:
Stored size: 1.07 KB
Contents
require 'test_helper' describe '<%= "#{@env[:stack_path].gsub('/', ' ')}" %>' do Given(:workbench) { 'empty' } Given(:cli) { Roro::CLI.new } Given(:adventures) { %w[] } Given(:overrides) { %w[] } Given(:rollon) { ## Answers adventure questions according to values set in the :adventures array. stub_adventure ## Answers environment variable questions according to values set in # the overrides array. Defaults to 'y'. stub_overrides ## Ensures Thor run commands are stubbed. stub_run_actions cli.rollon ## To quiet the test output do: # quiet { cli.rollon } } ## Tests will hang if the :adventures array is empty. Given { rollon unless adventures.empty?} context 'when default variables interpolated' do Then { assert_file "<%= "#{@env[:stack]}/#{@env[:story]}/#{@env[:story]}.yml" %>", /env/ } end context 'when many items interpolated' do Given(:contents) { [:env, :preface, :actions] } Then { contents.each { |c| assert_file "<%= "#{@env[:stack_path]}" %>", c } } end end
Version data entries
5 entries across 5 versions & 1 rubygems