Sha256: 0ac38e6a9899de1dc28e16b93b549ba37d2a9f311ff17e4aa5f3aa176b0b42e3

Contents?: true

Size: 730 Bytes

Versions: 2

Compression:

Stored size: 730 Bytes

Contents

require 'spec_helper'

module Beatport::Catalog
  describe "AudioFormat" do
    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

2 entries across 2 versions & 1 rubygems

Version Path
beatport-0.1.3 spec/catalog/audio_format_spec.rb
beatport-0.1.2 spec/catalog/audio_format_spec.rb