Improve test
This commit is contained in:
parent
1fc1c82aed
commit
490679da45
@ -3,24 +3,23 @@
|
||||
|
||||
describe Cask::Artifact::AbstractArtifact, :cask do
|
||||
describe ".read_script_arguments" do
|
||||
let(:stanza) { :installer }
|
||||
|
||||
it "accepts a string, and uses it as the executable" do
|
||||
arguments = "something"
|
||||
stanza = :installer
|
||||
|
||||
expect(described_class.read_script_arguments(arguments, stanza)).to eq(["something", {}])
|
||||
end
|
||||
|
||||
it "accepts a hash with an executable" do
|
||||
arguments = { executable: "something" }
|
||||
stanza = :installer
|
||||
|
||||
expect(described_class.read_script_arguments(arguments, stanza)).to eq(["something", {}])
|
||||
end
|
||||
|
||||
it "does not mutate the arguments in place" do
|
||||
arguments = { executable: "something", foo: "bar" }
|
||||
it "does not mutate the original arguments in place" do
|
||||
arguments = { executable: "something" }
|
||||
clone = arguments.dup
|
||||
stanza = :installer
|
||||
|
||||
described_class.read_script_arguments(arguments, stanza)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user