-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from abangratz/master
Create options for skipping plugins in <publishers> tag
- Loading branch information
Showing
3 changed files
with
91 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,38 @@ | |||
require 'spec_helper' | |||
|
|||
describe KrakenBuild do | |||
context "Setting config" do | |||
let(:options) { mock(Hash).as_null_object } | |||
|
|||
it "sets the config options at @config" do | |||
kraken = KrakenBuild.set_config(options) | |||
KrakenBuild.instance_variable_get(:@config).should eq(options) | |||
end | |||
|
|||
it "sets the repository option as @repository" do | |||
repository = mock(String) | |||
options.should_receive(:[]).with(:repository).and_return(repository) | |||
kraken = KrakenBuild.set_config(options) | |||
KrakenBuild.instance_variable_get(:@repository).should eq(repository) | |||
end | |||
|
|||
it "sets the github api from instance call" do | |||
github_api = mock(GithubApi).as_null_object | |||
GithubApi.should_receive(:new).and_return(github_api) | |||
kraken = KrakenBuild.set_config(options) | |||
KrakenBuild.instance_variable_get(:@github).should eq(github_api) | |||
end | |||
it "sets the jenkins api from instance call" do | |||
jenkins_api = mock(GithubApi).as_null_object | |||
JenkinsApi.should_receive(:new).and_return(jenkins_api) | |||
kraken = KrakenBuild.set_config(options) | |||
KrakenBuild.instance_variable_get(:@jenkins).should eq(jenkins_api) | |||
end | |||
it "returns the config" do | |||
kraken = KrakenBuild.set_config(options) | |||
KrakenBuild.instance_variable_get(:@config).should eq(options) | |||
kraken.should eq(options) | |||
end | |||
|
|||
end | |||
end |