Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

wip - add basis of wizard

  • Loading branch information...
commit 362ad99a35d0d3d4a99f86f9f5ccf321e986f477 1 parent 6e00ce9
@ohrite ohrite authored
View
5 .gitignore
@@ -5,7 +5,8 @@ pkg/*
features/config/secrets.yml
.idea
spec/tmp
-spec/reports/
+spec/reports
.vagrant
.kitchen
-.env
+.env
+/tmp
View
11 lib/lobot/wizard.rb
@@ -0,0 +1,11 @@
+module Lobot
+ class Wizard
+ attr_reader :config
+
+ def initialize(config)
+ @config = config
+ end
+
+ def
+ end
+end
View
14 spec/helpers/io_helpers.rb
@@ -0,0 +1,14 @@
+module IOHelpers
+ def capture(stream = :stdout)
+ begin
+ stream = stream.to_s
+ eval "$#{stream} = StringIO.new"
+ yield
+ result = eval("$#{stream}").string
+ ensure
+ eval("$#{stream} = #{stream.upcase}")
+ end
+
+ result
+ end
+end
View
13 spec/lib/lobot/wizard_spec.rb
@@ -0,0 +1,13 @@
+require "spec_helper"
+
+describe Lobot::Wizard do
+ let(:lobot_config) { Lobot::Config.new }
+
+ subject { Lobot::Wizard.new(lobot_config) }
+
+ describe "#prompt_for_build_name" do
+ it "accepts the name of the build" do
+ capture { subject.prompt_for_build_name }
+ end
+ end
+end
View
6 spec/spec_helper.rb
@@ -4,3 +4,9 @@
require "lobot/cli"
require "godot"
require "tempfile"
+
+Dir.glob(File.expand_path("../helpers/**/*.rb", __FILE__)).each { |h| require h}
+
+RSpec.configure do |config|
+ config.include IOHelpers
+end
Please sign in to comment.
Something went wrong with that request. Please try again.