diff --git a/Library/Homebrew/test/cask/artifact/abstract_artifact_spec.rb b/Library/Homebrew/test/cask/artifact/abstract_artifact_spec.rb index 1c86058b11..24e35e969d 100644 --- a/Library/Homebrew/test/cask/artifact/abstract_artifact_spec.rb +++ b/Library/Homebrew/test/cask/artifact/abstract_artifact_spec.rb @@ -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)