collectiveidea / delayed_job forked from tobi/delayed_job

Database based asynchronously priority queue system -- Extracted from Shopify

This URL has Read+Write access

delayed_job / spec / story_spec.rb
100644 17 lines (12 sloc) 0.377 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require File.dirname(__FILE__) + '/database'
 
describe "A story" do
 
  before(:all) do
    @story = Story.create :text => "Once upon a time..."
  end
 
  it "should be shared" do
    @story.tell.should == 'Once upon a time...'
  end
 
  it "should not return its result if it storytelling is delayed" do
    @story.send_later(:tell).should_not == 'Once upon a time...'
  end
 
end