Sha256: 04b132199a0a42e09ef632a9ef7b3579f3745a1bd939420e791ae8bb500e1a8a

Contents?: true

Size: 1.04 KB

Versions: 6

Compression:

Stored size: 1.04 KB

Contents

require 'ostruct'

module FlickrMocks
  class Fixtures
    attr_accessor :photos,:interesting_photos,:author_photos,:photo,:photo_details,
                      :photo_sizes,:photo_size,:expected_methods,:empty_photos,:commons_institutions

    def initialize
      @photos = load_fixture(:photos)
      @interesting_photos = load_fixture(:interesting_photos)
      @author_photos = load_fixture(:author_photos)

      @photo = load_fixture(:photo)
      @photo_details= load_fixture(:photo_details)
      
      @photo_sizes = load_fixture(:photo_sizes)
      @photo_size = load_fixture(:photo_size)

      @commons_institutions = load_fixture(:commons_institutions)
      
      @empty_photos = load_fixture(:empty_photos)

      @expected_methods = load_fixture(:expected_methods)

    end

    def self.repository
      File.expand_path(File.dirname(__FILE__) + '/../../spec/fixtures') + '/'
    end

    private
    def load_fixture(file)
      fname = Fixtures.repository + file.to_s + '.marshal'
      FlickrMocks::Helpers.load fname
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
flickrmocks-0.8.13 lib/flickr_mocks/fixtures.rb
flickrmocks-0.8.12 lib/flickr_mocks/fixtures.rb
flickrmocks-0.8.11 lib/flickr_mocks/fixtures.rb
flickrmocks-0.8.10 lib/flickr_mocks/fixtures.rb
flickrmocks-0.8.9 lib/flickr_mocks/fixtures.rb
flickrmocks-0.8.8 lib/flickr_mocks/fixtures.rb