Class: FlickrMocks::Fixtures

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/flickr_mocks/fixtures.rb

Overview

contains fixtures for various FlickRaw responses. This class is used internally. For stubbing FlickrRaw APIs for your Rspec 2.0 please refer to the FlickrMocks::Stubs class. This is a singleton class. To access the singleton class instance you can call:

Fixtures.instance

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFixtures

Returns a new instance of Fixtures.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/flickr_mocks/fixtures.rb', line 17

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)
  @commons_institution_photos = load_fixture(:commons_institution_photos)

  @empty_photos = load_fixture(:empty_photos)

  @expected_methods = load_fixture(:expected_methods)
end

Instance Attribute Details

#author_photosObject

Returns the value of attribute author_photos.



13
14
15
# File 'lib/flickr_mocks/fixtures.rb', line 13

def author_photos
  @author_photos
end

#commons_institution_photosObject

Returns the value of attribute commons_institution_photos.



13
14
15
# File 'lib/flickr_mocks/fixtures.rb', line 13

def commons_institution_photos
  @commons_institution_photos
end

#commons_institutionsObject

Returns the value of attribute commons_institutions.



13
14
15
# File 'lib/flickr_mocks/fixtures.rb', line 13

def commons_institutions
  @commons_institutions
end

#empty_photosObject

Returns the value of attribute empty_photos.



13
14
15
# File 'lib/flickr_mocks/fixtures.rb', line 13

def empty_photos
  @empty_photos
end

#expected_methodsObject

Returns the value of attribute expected_methods.



13
14
15
# File 'lib/flickr_mocks/fixtures.rb', line 13

def expected_methods
  @expected_methods
end

#interesting_photosObject

Returns the value of attribute interesting_photos.



13
14
15
# File 'lib/flickr_mocks/fixtures.rb', line 13

def interesting_photos
  @interesting_photos
end

#photoObject

Returns the value of attribute photo.



13
14
15
# File 'lib/flickr_mocks/fixtures.rb', line 13

def photo
  @photo
end

#photo_detailsObject

Returns the value of attribute photo_details.



13
14
15
# File 'lib/flickr_mocks/fixtures.rb', line 13

def photo_details
  @photo_details
end

#photo_sizeObject

Returns the value of attribute photo_size.



13
14
15
# File 'lib/flickr_mocks/fixtures.rb', line 13

def photo_size
  @photo_size
end

#photo_sizesObject

Returns the value of attribute photo_sizes.



13
14
15
# File 'lib/flickr_mocks/fixtures.rb', line 13

def photo_sizes
  @photo_sizes
end

#photosObject

Returns the value of attribute photos.



13
14
15
# File 'lib/flickr_mocks/fixtures.rb', line 13

def photos
  @photos
end

Class Method Details

.repositoryObject

returns directory where fixtures are stored.



37
38
39
# File 'lib/flickr_mocks/fixtures.rb', line 37

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