Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 193
- Log:
First stage commit of Typo 4.1, modified for the ROOL site.
Includes all local modifications but a final pass needs to be
made to delete any files left over from earlier Typo versions
that shouldn't be here anymore. See the 'tags' section of the
repository for a clean Typo 4.1 tree.Note that symlinks to shared files in the RISC OS Open theme
directory have been deliberately included this time around; I
decided that on balance it was better to leave them in as
placeholders, since unlike symlinks in app/views/shared, the
Typo theme structure is not a standard Rails concept.
- Author:
- rool
- Date:
- Wed Apr 04 18:51:02 +0100 2007
- Size:
- 1080 Bytes
1 | require File.dirname(__FILE__) + '/../spec_helper' |
2 | |
3 | context 'With the contents fixture' do |
4 | fixtures :contents |
5 | |
6 | setup do |
7 | @page = mock('fake_page') |
8 | @page.stub!(:id).and_return(1) |
9 | @page.stub!(:type).and_return('Page') |
10 | @page.stub!(:new_record?).and_return(false) |
11 | @page.stub!(:class).and_return(Page) |
12 | Content.stub!(:find).and_return(@page) |
13 | @current_utime = 1 |
14 | Time.stub!(:now).and_return { Time.at(@current_utime) } |
15 | end |
16 | |
17 | def sleep(time_delta) |
18 | @current_utime += time_delta |
19 | end |
20 | |
21 | specify '.post_action should not fire immediately for future triggers' do |
22 | lambda do |
23 | Trigger.post_action(Time.now + 2, @page, 'tickle') |
24 | Trigger.count.should == 1 |
25 | Trigger.fire |
26 | Trigger.count.should == 1 |
27 | end.should_not_raise |
28 | |
29 | @page.should_receive(:tickle) |
30 | sleep 2 |
31 | Trigger.fire |
32 | Trigger.count.should == 0 |
33 | end |
34 | |
35 | specify '.post_action should fire immediately if the target time is <= now' do |
36 | @page.should_receive(:tickle) |
37 | Trigger.post_action(Time.now, @page, 'tickle') |
38 | Trigger.count.should == 0 |
39 | end |
40 | |
41 | end |