Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 49 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  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