mirror of
https://github.com/tmuxinator/tmuxinator.git
synced 2026-03-11 18:24:23 -05:00
changes bootstrap to accept array of args (vs varargs)
This commit is contained in:
@@ -4,4 +4,4 @@ $:.unshift File.expand_path("../../lib/", __FILE__)
|
||||
require "thor"
|
||||
require "tmuxinator"
|
||||
|
||||
Tmuxinator::Cli.bootstrap *ARGV
|
||||
Tmuxinator::Cli.bootstrap ARGV
|
||||
|
||||
@@ -364,7 +364,7 @@ module Tmuxinator
|
||||
# array or ARGV, not a varargs. Perhaps ::bootstrap should as well?
|
||||
# - ::start has a different purpose from #start and hence a different
|
||||
# signature
|
||||
def self.bootstrap(*args)
|
||||
def self.bootstrap(args = [])
|
||||
name = args[0] || nil
|
||||
if args.empty? && Tmuxinator::Config.local?
|
||||
Tmuxinator::Cli.new.local
|
||||
|
||||
@@ -43,13 +43,13 @@ describe Tmuxinator::Cli do
|
||||
context "base thor functionality" do
|
||||
shared_examples_for :base_thor_functionality do
|
||||
it "supports -v" do
|
||||
out, err = capture_io { cli.bootstrap("-v") }
|
||||
out, err = capture_io { cli.bootstrap(["-v"]) }
|
||||
expect(err).to eq ""
|
||||
expect(out).to include(Tmuxinator::VERSION)
|
||||
end
|
||||
|
||||
it "supports help" do
|
||||
out, err = capture_io { cli.bootstrap("help") }
|
||||
out, err = capture_io { cli.bootstrap(["help"]) }
|
||||
expect(err).to eq ""
|
||||
expect(out).to include("tmuxinator commands:")
|
||||
end
|
||||
@@ -65,7 +65,7 @@ describe Tmuxinator::Cli do
|
||||
end
|
||||
|
||||
describe "::bootstrap" do
|
||||
subject { cli.bootstrap(*args) }
|
||||
subject { cli.bootstrap(args) }
|
||||
let(:args) { [] }
|
||||
|
||||
shared_examples_for :bootstrap_with_arguments do
|
||||
|
||||
Reference in New Issue
Block a user