Use short-style lambdas.

This commit is contained in:
Markus Reiter 2016-10-23 14:30:32 +02:00
parent ceec5a82c1
commit 783dbcc937
5 changed files with 6 additions and 13 deletions

View File

@ -5,7 +5,7 @@ describe Hbc::Artifact::App do
let(:cask) { Hbc.load("with-alt-target") } let(:cask) { Hbc.load("with-alt-target") }
let(:install_phase) { let(:install_phase) {
lambda { Hbc::Artifact::App.new(cask).install_phase } -> { Hbc::Artifact::App.new(cask).install_phase }
} }
let(:source_path) { cask.staged_path.join("Caffeine.app") } let(:source_path) { cask.staged_path.join("Caffeine.app") }

View File

@ -9,13 +9,8 @@ describe Hbc::Artifact::App do
let(:source_path) { cask.staged_path.join("Caffeine.app") } let(:source_path) { cask.staged_path.join("Caffeine.app") }
let(:target_path) { Hbc.appdir.join("Caffeine.app") } let(:target_path) { Hbc.appdir.join("Caffeine.app") }
let(:install_phase) { let(:install_phase) { -> { app.install_phase } }
lambda { app.install_phase } let(:uninstall_phase) { -> { app.uninstall_phase } }
}
let(:uninstall_phase) {
lambda { app.uninstall_phase }
}
before do before do
TestHelper.install_without_artifacts(cask) TestHelper.install_without_artifacts(cask)

View File

@ -4,7 +4,7 @@ describe Hbc::Artifact::Artifact do
let(:cask) { Hbc.load("with-generic-artifact") } let(:cask) { Hbc.load("with-generic-artifact") }
let(:install_phase) { let(:install_phase) {
lambda { Hbc::Artifact::Artifact.new(cask).install_phase } -> { Hbc::Artifact::Artifact.new(cask).install_phase }
} }
let(:source_path) { cask.staged_path.join("Caffeine.app") } let(:source_path) { cask.staged_path.join("Caffeine.app") }

View File

@ -3,9 +3,7 @@ require "test_helper"
describe Hbc::Artifact::Suite do describe Hbc::Artifact::Suite do
let(:cask) { Hbc.load("with-suite") } let(:cask) { Hbc.load("with-suite") }
let(:install_phase) { let(:install_phase) { -> { Hbc::Artifact::Suite.new(cask).install_phase } }
lambda { Hbc::Artifact::Suite.new(cask).install_phase }
}
let(:target_path) { Hbc.appdir.join("Caffeine") } let(:target_path) { Hbc.appdir.join("Caffeine") }
let(:source_path) { cask.staged_path.join("Caffeine") } let(:source_path) { cask.staged_path.join("Caffeine") }

View File

@ -5,7 +5,7 @@ describe Hbc::Artifact::App do
let(:cask) { Hbc.load("with-two-apps-correct") } let(:cask) { Hbc.load("with-two-apps-correct") }
let(:install_phase) { let(:install_phase) {
lambda { Hbc::Artifact::App.new(cask).install_phase } -> { Hbc::Artifact::App.new(cask).install_phase }
} }
let(:source_path_mini) { cask.staged_path.join("Caffeine Mini.app") } let(:source_path_mini) { cask.staged_path.join("Caffeine Mini.app") }