spec/configuration_spec.rb in jiralicious-0.0.6 vs spec/configuration_spec.rb in jiralicious-0.1.0
- old
+ new
@@ -1,7 +1,7 @@
# encoding: utf-8
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require "spec_helper"
describe Jiralicious::Configuration do
before :each do
Jiralicious.reset
end
@@ -9,21 +9,24 @@
it "sets the options to their default value" do
Jiralicious.username.should be_nil
Jiralicious.password.should be_nil
Jiralicious.uri.should be_nil
Jiralicious.api_version.should == "latest"
+ Jiralicious.auth_type.should == :basic
end
it "allows setting of options in a block" do
Jiralicious.configure do |config|
config.username = "jstewart"
config.password = "derp"
config.uri = "http://example.com/foo/bar"
config.api_version = "2.0aplha"
+ config.auth_type = :cookie_session
end
Jiralicious.username.should == "jstewart"
Jiralicious.password.should == "derp"
- Jiralicious.uri = "http://example.com/foo/bar"
- Jiralicious.api_version = "2.0aplha"
+ Jiralicious.uri.should == "http://example.com/foo/bar"
+ Jiralicious.api_version.should == "2.0aplha"
+ Jiralicious.auth_type.should == :cookie_session
end
end