flickrmocks 0.8.12 → 0.8.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.12
1
+ 0.8.13
data/flickrmocks.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{flickrmocks}
8
- s.version = "0.8.12"
8
+ s.version = "0.8.13"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Takaltoo"]
12
- s.date = %q{2010-11-19}
12
+ s.date = %q{2010-12-06}
13
13
  s.description = %q{FlickrMocks makes it possible to Marshal responses
14
14
  generated from the FLickRaw gem. This is useful for
15
15
  Mocking/Stubbing the Flickr interface for testing purposes.
@@ -8,6 +8,10 @@ module FlickrMocks
8
8
  raise ArgumentError 'owner id for photo did not match owner id for at least one size' unless valid_owner_for_dimensions?
9
9
  end
10
10
 
11
+ def author
12
+ owner_name.empty? ? owner_username : owner_name
13
+ end
14
+
11
15
  def owner_name
12
16
  self.owner.realname
13
17
  end
@@ -52,6 +52,19 @@ describe APP::PhotoDetails do
52
52
  end
53
53
  end
54
54
 
55
+
56
+ specify {subject.should respond_to(:author)}
57
+ context "#author" do
58
+ it "returns owner_name when NOT empty" do
59
+ subject.stub(:owner_name).and_return("Sample Owner")
60
+ subject.author.should == subject.owner_name
61
+ end
62
+ it "returns owner_username when owner_name is NOT present" do
63
+ subject.stub(:owner_name).and_return("")
64
+ subject.author.should == subject.owner_username
65
+ end
66
+ end
67
+
55
68
  specify {subject.should respond_to(:dimensions)}
56
69
  context "#dimensions" do
57
70
  it "returns expected PhotoSize object" do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 8
8
- - 12
9
- version: 0.8.12
8
+ - 13
9
+ version: 0.8.13
10
10
  platform: ruby
11
11
  authors:
12
12
  - Takaltoo
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-19 00:00:00 -08:00
17
+ date: 2010-12-06 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency