From ec9c8d7dae4fcdebc9853d85a9b249fbca2c83b3 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Wed, 14 Aug 2013 20:38:21 +0200 Subject: [PATCH 1/2] Remove photo backdrop in single post view. --- lib/template_picker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/template_picker.rb b/lib/template_picker.rb index 40b6f388e..6dd9a7269 100644 --- a/lib/template_picker.rb +++ b/lib/template_picker.rb @@ -28,7 +28,7 @@ class TemplatePicker end def photo_backdrop? - post.photos.size == 1 + false # No backdrop, ever. end def status? From e9977af7b14fea65c3120b97e88305b6b27bdcfc Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Fri, 16 Aug 2013 11:08:22 +0200 Subject: [PATCH 2/2] Fix specs for TemplatePicker --- spec/lib/template_picker_spec.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/spec/lib/template_picker_spec.rb b/spec/lib/template_picker_spec.rb index 32b47eb88..e1ae5e41a 100644 --- a/spec/lib/template_picker_spec.rb +++ b/spec/lib/template_picker_spec.rb @@ -24,9 +24,9 @@ describe TemplatePicker do end describe '#status_with_photo_backdrop?' do - it 'is true if the post contains a single photo and text' do + it 'is false even if the post contains a single photo and text' do @post_stubs.merge!(:photos => stub(:size => 1)) - TemplatePicker.new(post).should be_status_with_photo_backdrop + TemplatePicker.new(post).should_not be_status_with_photo_backdrop end end @@ -37,9 +37,9 @@ describe TemplatePicker do end describe '#photo_backdrop?' do - it 'is true if the post contains only one photo' do + it 'is false even if the post contains only one photo' do @post_stubs.merge!(:photos => stub(:size => 1)) - TemplatePicker.new(post).should be_photo_backdrop + TemplatePicker.new(post).should_not be_photo_backdrop end end @@ -51,7 +51,8 @@ describe TemplatePicker do end describe 'factories' do - TemplatePicker::TEMPLATES.each do |template| + # No photo_backdrop for now. + (TemplatePicker::TEMPLATES - ['status_with_photo_backdrop', 'photo_backdrop']).each do |template| describe "#{template} factory" do it 'works' do post = FactoryGirl.build(template.to_sym, :author => alice.person)