Class: FlickrMocks::Fixtures
- Inherits:
-
Object
- Object
- FlickrMocks::Fixtures
- 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
-
#author_photos ⇒ Object
Returns the value of attribute author_photos.
-
#commons_institution_photos ⇒ Object
Returns the value of attribute commons_institution_photos.
-
#commons_institutions ⇒ Object
Returns the value of attribute commons_institutions.
-
#empty_photos ⇒ Object
Returns the value of attribute empty_photos.
-
#expected_methods ⇒ Object
Returns the value of attribute expected_methods.
-
#interesting_photos ⇒ Object
Returns the value of attribute interesting_photos.
-
#photo ⇒ Object
Returns the value of attribute photo.
-
#photo_details ⇒ Object
Returns the value of attribute photo_details.
-
#photo_size ⇒ Object
Returns the value of attribute photo_size.
-
#photo_sizes ⇒ Object
Returns the value of attribute photo_sizes.
-
#photos ⇒ Object
Returns the value of attribute photos.
Class Method Summary collapse
-
.repository ⇒ Object
returns directory where fixtures are stored.
Instance Method Summary collapse
-
#initialize ⇒ Fixtures
constructor
A new instance of Fixtures.
Constructor Details
#initialize ⇒ Fixtures
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_photos ⇒ Object
Returns the value of attribute author_photos.
13 14 15 |
# File 'lib/flickr_mocks/fixtures.rb', line 13 def @author_photos end |
#commons_institution_photos ⇒ Object
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_institutions ⇒ Object
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_photos ⇒ Object
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_methods ⇒ Object
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_photos ⇒ Object
Returns the value of attribute interesting_photos.
13 14 15 |
# File 'lib/flickr_mocks/fixtures.rb', line 13 def interesting_photos @interesting_photos end |
#photo ⇒ Object
Returns the value of attribute photo.
13 14 15 |
# File 'lib/flickr_mocks/fixtures.rb', line 13 def photo @photo end |
#photo_details ⇒ Object
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_size ⇒ Object
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_sizes ⇒ Object
Returns the value of attribute photo_sizes.
13 14 15 |
# File 'lib/flickr_mocks/fixtures.rb', line 13 def photo_sizes @photo_sizes end |
#photos ⇒ Object
Returns the value of attribute photos.
13 14 15 |
# File 'lib/flickr_mocks/fixtures.rb', line 13 def photos @photos end |
Class Method Details
.repository ⇒ Object
returns directory where fixtures are stored.
37 38 39 |
# File 'lib/flickr_mocks/fixtures.rb', line 37 def self.repository File.(File.dirname(__FILE__) + '/../../spec/fixtures') + '/' end |