Sha256: 730bf15f65aedc90fed4d76817018a2996f4aed6727600fd2ae31607e266c6a4

Contents?: true

Size: 1.13 KB

Versions: 50

Compression:

Stored size: 1.13 KB

Contents

require 'spec_helper'

describe Dugway::Drops::ArtistsDrop do
  let(:artists) { Dugway::Drops::ArtistsDrop.new(Dugway.store.artists.map { |a| Dugway::Drops::ArtistDrop.new(a) }) }

  describe "#all" do
    it "should return an array of all artists" do
      all = artists.all
      all.should be_an_instance_of(Array)
      all.size.should == 3

      artist = all.first
      artist.should be_an_instance_of(Dugway::Drops::ArtistDrop)
      artist.name.should == 'Artist One'
    end
  end

  describe "#active" do
    it "should return an array of all active artists" do
      active = artists.active
      active.should be_an_instance_of(Array)
      active.size.should == 2

      artist = active.first
      artist.should be_an_instance_of(Dugway::Drops::ArtistDrop)
      artist.name.should == 'Artist One'
    end
  end

  describe "#permalink" do
    it "should return the artist by permalink" do
      artist = artists.threezer
      artist.should be_an_instance_of(Dugway::Drops::ArtistDrop)
      artist.name.should == 'Threezer'
    end

    it "should return the nil for an invalid permalink" do
      artists.blah.should be_nil
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
dugway-1.0.14 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-1.0.13 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-1.0.12 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-1.0.10 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-1.0.9 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-1.0.8 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-1.0.7 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-1.0.6 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-1.0.5 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-1.0.4 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-1.0.3 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-1.0.2 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-1.0.1 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-1.0.0 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-0.12.3 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-0.12.2 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-0.12.1 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-0.12.0 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-0.11.4 spec/units/dugway/liquid/drops/artists_drop_spec.rb
dugway-0.11.3 spec/units/dugway/liquid/drops/artists_drop_spec.rb