Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

Commit

Permalink
wip - add basis of wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
ohrite committed Dec 2, 2012
1 parent 6e00ce9 commit 362ad99
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Expand Up @@ -5,7 +5,8 @@ pkg/*
features/config/secrets.yml
.idea
spec/tmp
spec/reports/
spec/reports
.vagrant
.kitchen
.env
.env
/tmp
11 changes: 11 additions & 0 deletions lib/lobot/wizard.rb
@@ -0,0 +1,11 @@
module Lobot
class Wizard
attr_reader :config

def initialize(config)
@config = config
end

def
end
end
14 changes: 14 additions & 0 deletions 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
13 changes: 13 additions & 0 deletions 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
6 changes: 6 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -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

0 comments on commit 362ad99

Please sign in to comment.