daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. describe 'Public images finder' do
  2.   fixtures :pictures
  3.  
  4.   it 'should_not incude hidden' do
  5.     Picture.with_hidden_scope(false) do
  6.       Picture.find(:all)
  7.     end.should_not include(pictures(:hidden))
  8.   end
  9. end
  10.  
  11. describe Picture, 'public scope' do
  12.   fixtures :pictures
  13.  
  14.   before :each do
  15.     @pictures = Picture.with_public_scope { Picture.find(:all) }
  16.   end
  17.  
  18.   it 'should not include hidden pictures' do
  19.     @pictures.should_not include(pictures(:hidden))
  20.   end
  21.  
  22.   it 'should include appropriate' do
  23.     @pictures.should include(pictures(:appropriate))
  24.   end
  25.  
  26.   it 'should not include inappropriate' do
  27.     @pictures.should_not include(pictures(:inappropriate))
  28.   end
  29. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top