Sha256: 0769ea069762abacb9f1153bfec0cf6d2fda0085c46bc787e75557ba041e1091

Contents?: true

Size: 990 Bytes

Versions: 16

Compression:

Stored size: 990 Bytes

Contents

# frozen_string_literal: true

require 'ehbrs/vg/wii/wit/path'

RSpec.describe ::Ehbrs::Vg::Wii::Wit::Path do
  describe '#parse' do
    context 'when type is present' do
      let(:source) { 'WbFs:path/to/file.wbfs' }
      let(:instance) { described_class.parse(source) }

      it { expect(instance.type).to eq('WBFS') }
      it { expect(instance.path.to_s).to eq('path/to/file.wbfs') }
    end

    context 'when type is blank' do
      let(:source) { 'path/to/file.wbfs' }
      let(:instance) { described_class.parse(source) }

      it { expect(instance.type).to eq('') }
      it { expect(instance.path.to_s).to eq('path/to/file.wbfs') }
    end
  end

  describe '#change?' do
    let(:with_type) { described_class.new('ISO', 'path/to/file.wbfs') }
    let(:without_type) { described_class.new(nil, 'path/to/file.wbfs') }

    it { expect(with_type.change?(without_type)).to eq(false) }
    it { expect(without_type.change?(with_type)).to eq(true) }

    context 'when'
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ehbrs-tools-0.35.1 spec/lib/ehbrs/vg/wii/wit/path_spec.rb
ehbrs-tools-0.35.0 spec/lib/ehbrs/vg/wii/wit/path_spec.rb
ehbrs-tools-0.34.0 spec/lib/ehbrs/vg/wii/wit/path_spec.rb
ehbrs-tools-0.33.0 spec/lib/ehbrs/vg/wii/wit/path_spec.rb
ehbrs-tools-0.32.0 spec/lib/ehbrs/vg/wii/wit/path_spec.rb
ehbrs-tools-0.31.1 spec/lib/ehbrs/vg/wii/wit/path_spec.rb
ehbrs-tools-0.31.0 spec/lib/ehbrs/vg/wii/wit/path_spec.rb
ehbrs-tools-0.30.0 spec/lib/ehbrs/vg/wii/wit/path_spec.rb
ehbrs-tools-0.29.0 spec/lib/ehbrs/vg/wii/wit/path_spec.rb
ehbrs-tools-0.28.3 spec/lib/ehbrs/vg/wii/wit/path_spec.rb
ehbrs-tools-0.28.2 spec/lib/ehbrs/vg/wii/wit/path_spec.rb
ehbrs-tools-0.28.1 spec/lib/ehbrs/vg/wii/wit/path_spec.rb
ehbrs-tools-0.28.0 spec/lib/ehbrs/vg/wii/wit/path_spec.rb
ehbrs-tools-0.27.0 spec/lib/ehbrs/vg/wii/wit/path_spec.rb
ehbrs-tools-0.26.0 spec/lib/ehbrs/vg/wii/wit/path_spec.rb
ehbrs-tools-0.25.1 spec/lib/ehbrs/vg/wii/wit/path_spec.rb