Sha256: 9a7f4c000b7f8b06260c6a995c5f2d8843e8e49e275f9ee6e0e377e71655420b

Contents?: true

Size: 628 Bytes

Versions: 11

Compression:

Stored size: 628 Bytes

Contents

require 'spec_helper'

describe Reviewed::Award do

  let(:client) do
    Reviewed::Client.new(api_key: TEST_KEY, base_uri: TEST_URL)
  end

  describe 'associations' do

    describe 'articles', vcr: true do

      before(:each) do
        @award = client.awards.find('best-of-year')
      end

      it 'has_many :articles' do
        Reviewed::Award._embedded_many.should include({"articles"=>"Reviewed::Article"})
      end

      it 'returns attachments of the correct class' do
        @award.articles.each do |article|
          article.should be_an_instance_of(Reviewed::Article)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
reviewed-1.2.4 spec/award_spec.rb
reviewed-1.2.3 spec/award_spec.rb
reviewed-1.3.0 spec/award_spec.rb
reviewed-1.2.2 spec/award_spec.rb
reviewed-1.2.0 spec/award_spec.rb
reviewed-1.1.0 spec/award_spec.rb
reviewed-1.0.4 spec/award_spec.rb
reviewed-1.0.3 spec/award_spec.rb
reviewed-1.0.2 spec/award_spec.rb
reviewed-1.0.1 spec/award_spec.rb
reviewed-1.0.0 spec/award_spec.rb