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:
- 1445 Bytes
1 | require File.dirname(__FILE__) + '/../spec_helper' |
2 | |
3 | context 'Given the results of Category.find_all_with_article_counters' do |
4 | fixtures :contents, :categories, :categorizations, :blogs |
5 | |
6 | setup { @cats = Category.find_all_with_article_counters } |
7 | |
8 | specify "Categories should be sorted by category.position" do |
9 | @cats.should == @cats.sort_by { |c| c.position } |
10 | end |
11 | |
12 | specify "Counts should be correct" do |
13 | @cats.each do |cat| |
14 | cat.article_counter.should == cat.published_articles.size |
15 | end |
16 | end |
17 | end |
18 | |
19 | context 'Given the fixtures' do |
20 | fixtures :contents, :categories, :categorizations, :blogs |
21 | |
22 | specify 'find gets the order right' do |
23 | cats = Category.find(:all) |
24 | cats.should == cats.sort_by { |c| c.position } |
25 | Category.reorder(cats.reverse.collect { |c| c.id }) |
26 | Category.find(:all).should == cats.reverse |
27 | end |
28 | |
29 | specify 'can still override order in find' do |
30 | cats = Category.find(:all, :order => 'name ASC') |
31 | |
32 | cats.should == cats.sort_by {|c| c.name} |
33 | Category.find(:all).should_not == cats |
34 | end |
35 | |
36 | specify '.reorder_alpha puts categories in alphabetical order' do |
37 | Category.find(:all).should_not == Category.find(:all, :order => :name) |
38 | Category.reorder_alpha |
39 | Category.find(:all).should == Category.find(:all, :order => :name) |
40 | end |
41 | |
42 | specify 'A category knows its url' do |
43 | categories(:software).permalink_url.should == |
44 | 'http://myblog.net/articles/category/software' |
45 | end |
46 | end |
47 | |
48 |