spec: add a test for making a new sprue

This commit is contained in:
Andy Meneely
2017-07-21 15:10:26 -04:00
parent 07f3c3c14a
commit c969f8ecf4
2 changed files with 42 additions and 4 deletions
+4 -4
View File
@@ -15,9 +15,9 @@ module Squib
class MakeSprue
# :nodoc:
# @api private
def process(args)
def process(args, input = $stdin, output = $stdout)
# Get definitions from the user
@option = prompt
@option = prompt(input, output)
@printable_edge_right = (
@option.sheet_width - @option.sheet_margin.right)
@@ -38,9 +38,9 @@ module Squib
private
# Accept user input that defines the template.
def prompt
def prompt(input, output)
option = TemplateOption.new
cli = HighLine.new
cli = HighLine.new(input, output)
option.unit = cli.choose do |menu|
menu.prompt = 'What measure unit should we use? '