public
Description: Database based asynchronously priority queue system -- Extracted from Shopify
Homepage: http://www.shopify.com
Clone URL: git://github.com/tobi/delayed_job.git
Search Repo:
delayed_job / spec / story_spec.rb
100644 18 lines (13 sloc) 0.507 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require File.dirname(__FILE__) + '/database'
 
describe "A story" do
  
  before do
    reset_db
    Story.create :text => "Once upon a time..."
  end
  
  it "should be shared" do
    Story.find(:first).tell.should == 'Once upon a time...'
  end
  
  it "should not return its result if it storytelling is delayed" do
    Story.find(:first).send_later(:tell).should_not == 'Once upon a time...'
  end
    
end