Permalink
Browse files

Fix flapping spec

  • Loading branch information...
1 parent d0a3fc7 commit 07037acfcf7d95b5c4ff50fe7ca83edb333859cc @citizen428 citizen428 committed Jul 12, 2012
Showing with 5 additions and 9 deletions.
  1. +5 −9 spec/lib/jenkins_api_spec.rb
@@ -4,24 +4,20 @@
context "configurations" do
before(:each) do
- api = JenkinsApi.new
+ JenkinsApi.instance_variable_set(:@default_options, {})
end
- it "uses no basic_auth when username and password are not prived" do
- pending("flapping")
- asd = {:user_name => nil, :password =>"nil"}
- api = asd
- api = JenkinsApi.new(asd)
-
+ it "uses no basic_auth when username and password are not prived" do
+ api = JenkinsApi.new
api.class.default_options[:basic_auth].should be(nil)
end
it "uses basic_auth when username and password prived" do
options = {:username => 'user', :password => 'password'}
api = JenkinsApi.new(options)
- api.class.default_options[:basic_auth][:username] == options[:username].should
- api.class.default_options[:basic_auth][:password] == options[:password].should
+ api.class.default_options[:basic_auth][:username].should == options[:username]
+ api.class.default_options[:basic_auth][:password].should == options[:password]
end
it "uses a port when provided" do

0 comments on commit 07037ac

Please sign in to comment.