Sha256: 0129f42187f7185ce7d17c55d7b7653cf3d0f4f34d5507b8284d583d8168a2b1

Contents?: true

Size: 659 Bytes

Versions: 5

Compression:

Stored size: 659 Bytes

Contents

#encoding: UTF-8

require 'helper/account'
require 'ruby-box'
require 'webmock/rspec'

describe RubyBox::Client do
  before do
    @session = RubyBox::Session.new
  end

  describe '#split_path' do
    it "returns the appropriate path" do
      client = RubyBox::Client.new(@session)
      client.split_path('foo/bar').should == ['foo', 'bar']
    end

    it "leading / is ignored" do
      client = RubyBox::Client.new(@session)
      client.split_path('/foo/bar').should == ['foo', 'bar']
    end

    it "trailing / is ignored" do
      client = RubyBox::Client.new(@session)
      client.split_path('foo/bar/').should == ['foo', 'bar']
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruby-box-1.0.5 spec/client_spec.rb
ruby-box-1.0.4 spec/client_spec.rb
ruby-box-1.0.3 spec/client_spec.rb
ruby-box-1.0.1 spec/client_spec.rb
ruby-box-1.0.0 spec/client_spec.rb