spec/api-client/configuration_spec.rb in api-client-2.0.0.rc1 vs spec/api-client/configuration_spec.rb in api-client-2.0.0.rc2

- old
+ new

@@ -1,51 +1,51 @@ require 'spec_helper' describe ApiClient::Configuration do - describe "#path" do - describe "when not configured" do + describe '#path' do + describe 'when not configured' do before :each do ApiClient.configure do |config| - config.path = "" + config.path = '' end end - it "should raise an error" do + it 'should raise an error' do lambda { ApiClient.config.path }.should raise_error(ApiClient::Exceptions::NotConfigured) end end - describe "when properly configured" do + describe 'when properly configured' do before :each do ApiClient.configure do |config| - config.path = "http://api.example.com" + config.path = 'http://api.example.com' end end - it "should return the path value" do + it 'should return the path value' do ApiClient.config.path.should_not be_nil end end end - describe "#path=" do + describe '#path=' do describe "with a string without '/'" do before :each do - ApiClient.config.path = "http://api.example.com" + ApiClient.config.path = 'http://api.example.com' end it "should set it with a '/'" do - ApiClient.config.path.should == "http://api.example.com/" + ApiClient.config.path.should == 'http://api.example.com/' end end describe "with a string with '/'" do before :each do - ApiClient.config.path = "http://api.example.com/" + ApiClient.config.path = 'http://api.example.com/' end it "should set it as passed" do - ApiClient.config.path.should == "http://api.example.com/" + ApiClient.config.path.should == 'http://api.example.com/' end end end -end +end \ No newline at end of file