spec/shell/basic_spec.rb in thor-0.15.1 vs spec/shell/basic_spec.rb in thor-0.15.2
- old
+ new
@@ -118,11 +118,23 @@
$stdout.should_receive(:puts).with(" create ~/.thor/task.thor")
shell.say_status(:create, "~/.thor/task.thor")
end
end
+ describe "#print_in_columns" do
+ before do
+ @array = [1234567890]
+ @array += ('a'..'e').to_a
+ end
+
+ it "prints in columns" do
+ content = capture(:stdout){ shell.print_in_columns(@array) }
+ content.rstrip.should == "1234567890 a b c d e"
+ end
+ end
+
describe "#print_table" do
- before(:each) do
+ before do
@table = []
@table << ["abc", "#123", "first three"]
@table << ["", "#0", "empty"]
@table << ["xyz", "#786", "last three"]
end