Sha256: 5d9b885d26f306ba51f8a388d95135b8b35db6ebd9f85a8dec281e0efea38f66
Contents?: true
Size: 1.52 KB
Versions: 3
Compression:
Stored size: 1.52 KB
Contents
require 'highline' require 'hobo/ui' describe Hobo::Ui do before do HighLine.use_color = false end describe "initialization" do it "should provide default color scheme" end describe "ask" do it "should return default if in non-interactive mode" it "should raise error if no default provided in non-interactive mode" it "should format prompt to include default if provided" it "should use default answer if given answer is empty" it "should handle stdin EOF (Ctrl+d)" end describe "color" do it "should format message with ansi style" end describe "color_scheme" do it "should set the global color scheme if argument provided" it "should return the global color scheme" end describe "debug" do it "should send message to stdout" do $stdout.should receive(:puts).with("test") Hobo::Ui.new.debug("test") end end describe "info" do it "should send message to stdout" do $stdout.should receive(:puts).with("test") Hobo::Ui.new.info("test") end end describe "warning" do it "should send message to stderr" do $stderr.should receive(:puts).with("test") Hobo::Ui.new.warning("test") end end describe "error" do it "should send message to stderr" do $stderr.should receive(:puts).with("test") Hobo::Ui.new.error("test") end end describe "success" do it "should send message to stdout" do $stdout.should receive(:puts).with("test") Hobo::Ui.new.success("test") end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hobo-inviqa-0.0.4 | spec/hobo/ui_spec.rb |
hobo-inviqa-0.0.3 | spec/hobo/ui_spec.rb |
hobo-inviqa-0.0.2 | spec/hobo/ui_spec.rb |