Sha256: 65fc2ababfd198e07f8cbd3b3faf8f0b2699d0239536b67c516e14cf15d85cdc

Contents?: true

Size: 687 Bytes

Versions: 7

Compression:

Stored size: 687 Bytes

Contents

require 'spec_helper'

describe 'ShowSet' do
  let(:show_uuid) { generate_uuid }
  let(:show) { Show.create(uuid: show_uuid) }
  
  let(:show_set_uuid) { generate_uuid }
  let(:set_spec) { {uuid: show_set_uuid, show_uuid: show.uuid, position: 0, encore: false} }
  let(:show_set) { ShowSet.create_from(set_spec) }
  
  context '#create_from' do
    subject { show_set }
    it { should_not == nil }
    its(:show) { should == show }    
  end

  context '#remove_from' do
    before(:each) do
      ShowSet.create_from(set_spec)
      ShowSet.remove_from(set_spec)
      show.show_sets.each {}
    end

    subject { show }

    its(:show_sets) { should_not include show_set }
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

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