jenkins-plugin-runtime 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,4 +32,30 @@ describe Jenkins::Plugin::Proxies::BuildWrapper do
|
|
32
32
|
@wrapper.setUp(@jBuild, @jLauncher, @jListener).should be_nil
|
33
33
|
end
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
|
+
describe "halting behavior on teardown" do
|
37
|
+
environment = nil
|
38
|
+
before do
|
39
|
+
@object.stub(:teardown).and_raise(Jenkins::Model::Build::Halt)
|
40
|
+
@object.stub(:setup)
|
41
|
+
environment = @wrapper.setUp(@jBuild, @jLauncher, @jListener)
|
42
|
+
end
|
43
|
+
|
44
|
+
it "returns false if the build was halted explicitly" do
|
45
|
+
environment.tearDown(@jBuild, @jListener).should be_false
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe "normal behavior on teardown" do
|
50
|
+
environment = nil
|
51
|
+
before do
|
52
|
+
@object.stub(:teardown).and_return(nil)
|
53
|
+
@object.stub(:setup)
|
54
|
+
environment = @wrapper.setUp(@jBuild, @jLauncher, @jListener)
|
55
|
+
end
|
56
|
+
|
57
|
+
it "returns true if the build was not halted explicitly" do
|
58
|
+
environment.tearDown(@jBuild, @jListener).should be_true
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -5,7 +5,7 @@ require 'jenkins/war'
|
|
5
5
|
for path in Dir[File.join(ENV['HOME'], '.jenkins', 'wars', Jenkins::War::VERSION, "**/*.jar")]
|
6
6
|
$CLASSPATH << path
|
7
7
|
end
|
8
|
-
$CLASSPATH << Pathname(__FILE__).dirname.join('../target')
|
8
|
+
$CLASSPATH << Pathname(__FILE__).dirname.join('../target/')
|
9
9
|
$:.unshift Pathname(__FILE__).dirname.join('../lib')
|
10
10
|
|
11
11
|
require 'jenkins/plugin/runtime'
|