Sha256: 8af0991e57b597a56c78262278be6d4a6cd9197080450e6a74e50aef6b849664

Contents?: true

Size: 853 Bytes

Versions: 11

Compression:

Stored size: 853 Bytes

Contents

require 'spec_helper'

module Beatport::Catalog
  describe "AudioFormat" do
    before :each do
      VCR.insert_cassette 'audio_format'
    end

    after :each do
      VCR.eject_cassette
    end

    describe 'structure' do
      subject { AudioFormat.all.first }
     
      it { should be_an(AudioFormat) }
      its (:id) { should == 1 }
      its (:name) { should == "mp3" }
      its (:person_preference_visibility) { should == true }
    end    
  
    describe '.all' do
      subject { AudioFormat.all }
      
      its (:length) { should be > 1 }
    end

    describe '.find' do
      context "by id" do
        subject { AudioFormat.find(2) }
        its (:name) { should == "m4a" }
      end
      
      context "by name" do
        subject { AudioFormat.find('wav') }
        its (:name) { should == "wav" }
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
beatport-0.4.0 spec/catalog/audio_format_spec.rb
beatport-0.3.0 spec/catalog/audio_format_spec.rb
beatport-0.2.3 spec/catalog/audio_format_spec.rb
beatport-0.2.2 spec/catalog/audio_format_spec.rb
beatport-0.2.1 spec/catalog/audio_format_spec.rb
beatport-0.2.0 spec/catalog/audio_format_spec.rb
beatport-0.1.10 spec/catalog/audio_format_spec.rb
beatport-0.1.9 spec/catalog/audio_format_spec.rb
beatport-0.1.8 spec/catalog/audio_format_spec.rb
beatport-0.1.7 spec/catalog/audio_format_spec.rb
beatport-0.1.6 spec/catalog/audio_format_spec.rb