/
sbt_spec.rb
30 lines (26 loc) · 1.03 KB
/
sbt_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require_relative 'spec_helper'
describe "Sbt" do
it "should not download pre-cached dependencies" do
Hatchet::Runner.new("sbt-minimal-scala-sample").deploy do |app|
expect(app.output).to match("Running: sbt update")
expect(app.output).to match("Running: sbt compile stage")
expect(app.output).to match(/Priming Ivy cache/)
expect(app.output).not_to match("downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt")
end
end
it "should run sbt-clean" do
app = Hatchet::Runner.new("sbt-minimal-scala-sample")
app.setup!
app.set_config("SBT_CLEAN" => "true")
app.deploy do |app|
expect(app.output).to match("Running: sbt clean compile stage")
end
end
it "not prime cache for sbt-start-script projects" do
Hatchet::Runner.new("sbt-start-script-sample") do |app|
# expect(app.output).to match("Running: sbt update")
expect(app.output).not_to match(/Priming Ivy cache/)
expect(app.output).to match("Running: sbt compile stage")
end
end
end