mattly / bork

the Bash-Operated Reconciling Kludge
Other
218 stars 29 forks source link

cask: add feature to pass --appdir argument #43

Closed frdmn closed 9 years ago

frdmn commented 9 years ago

@mattly I think i don't really understand the cask bats test case. Figured out the failing test is:

@test "cask status reports missing cask package" {
  respond_to "brew cask" "return 1"
  run cask status something
  [ "$status" -eq $STATUS_FAILED_PRECONDITION ]
}

But what happens here?

mattly commented 9 years ago

respond_to is a way of mocking actions performed by bake, so that the commands aren't run on the system proper. What it's doing in that case is looking for bake to call brew cask and then effectively it just evals return 1, indicating that cask is not installed.

I'm not sure why this is failing, given the changes, but I'll try to look at it tonight.

frdmn commented 9 years ago

Thanks

mattly commented 9 years ago

It wasn't a problem with your code, but rather a problem with bake and redirection. I rebased your branch against the latest master and the test passes now. Will merge shortly. Thanks!