Relax only_on rspec tests

only_on can be either a string or regex
This commit is contained in:
Brian Cain 2018-03-29 11:46:42 -07:00
parent 616b0f9ba6
commit 0953287262
No known key found for this signature in database
GPG Key ID: 43D51080D357A001
1 changed files with 2 additions and 10 deletions

View File

@ -66,24 +66,16 @@ describe VagrantPlugins::Kernel_V2::VagrantConfigTrigger do
before do
cfg.only_on = :guest
cfg.ignore = "up"
arr_cfg.only_on = [:guest, :other]
arr_cfg.only_on = ["guest", /other/]
arr_cfg.ignore = ["up", "destroy"]
end
it "ensures only_on is an array of strings" do
it "ensures only_on is an array" do
cfg.finalize!
arr_cfg.finalize!
expect(cfg.only_on).to be_a(Array)
expect(arr_cfg.only_on).to be_a(Array)
cfg.only_on.each do |a|
expect(a).to be_a(String)
end
arr_cfg.only_on.each do |a|
expect(a).to be_a(String)
end
end
it "ensures ignore is an array of symbols" do