Sha256: e85056372e592a6caae774926525494bcd98bcfc61e9c970e51815a3e4dba77e

Contents?: true

Size: 901 Bytes

Versions: 7

Compression:

Stored size: 901 Bytes

Contents

require 'spec_helper'

describe 'SetDBExtractor' do
  let(:show_uuid) { generate_uuid }
  let(:show) { Show.create(uuid: show_uuid) }
  
  let(:first_show_set_uuid) { generate_uuid }
  let(:sets) do
    [
      ShowSet.create(uuid: first_show_set_uuid) do |s|
        s.show = show
        s.position = 0
        s.encore = false
      end,
      ShowSet.create(uuid: generate_uuid) do |s|
        s.show = show
        s.position = 1
        s.encore = false
      end,
      ShowSet.create(uuid: generate_uuid) do |s|
        s.show = show
        s.position = 2
        s.encore = true
      end
    ]    
  end

  subject(:extracted) { Gdshowsdb::SetDBExtractor.new(sets).extract }
  
  its(:size) { should equal 3 }
  
  context 'individual item' do
    subject { extracted[0] }

    it { should == ({ uuid: first_show_set_uuid, show_uuid: show_uuid, position: 0, encore: false }) }    
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gdshowsdb-2.0.0 spec/gdshowsdb/set_db_extractor_spec.rb
gdshowsdb-1.0.3 spec/gdshowsdb/set_db_extractor_spec.rb
gdshowsdb-1.0.2 spec/gdshowsdb/set_db_extractor_spec.rb
gdshowsdb-1.0.1 spec/gdshowsdb/set_db_extractor_spec.rb
gdshowsdb-1.0.0 spec/gdshowsdb/set_db_extractor_spec.rb
gdshowsdb-0.9.1 spec/gdshowsdb/set_db_extractor_spec.rb
gdshowsdb-0.9.0 spec/gdshowsdb/set_db_extractor_spec.rb