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:
- 1591 Bytes
1 | require File.dirname(__FILE__) + '/../spec_helper' |
2 | |
3 | context 'Given loaded fixtures' do |
4 | fixtures :tags, :contents, :articles_tags, :blogs |
5 | |
6 | specify 'we can Tag.get by name' do |
7 | Tag.get('foo').should == tags(:foo_tag) |
8 | end |
9 | |
10 | specify 'tags are unique' do |
11 | lambda {Tag.create!(:name => 'test')}.should_not_raise |
12 | |
13 | test_tag = Tag.new(:name => 'test') |
14 | test_tag.should_not_be_valid |
15 | test_tag.errors.on(:name).should == 'has already been taken' |
16 | end |
17 | |
18 | specify 'display names with spaces can be found by joinedupname' do |
19 | Tag.find(:first, :conditions => {:name => 'Monty Python'}).should_be nil |
20 | tag = Tag.create(:name => 'Monty Python') |
21 | |
22 | tag.should_be_valid |
23 | tag.name.should == 'montypython' |
24 | tag.display_name.should == 'Monty Python' |
25 | |
26 | tag.should == Tag.get('montypython') |
27 | tag.should == Tag.get('Monty Python') |
28 | end |
29 | |
30 | specify 'articles can be tagged' do |
31 | a = Article.create(:title => 'an article') |
32 | a.tags << tags(:foo_tag) |
33 | a.tags << tags(:bar_tag) |
34 | |
35 | a.reload |
36 | a.tags.size.should == 2 |
37 | a.tags.sort_by(&:id).should == [tags(:foo_tag), tags(:bar_tag)].sort_by(&:id) |
38 | end |
39 | |
40 | specify 'find_all_with_article_counters finds 2 tags' do |
41 | tags = Tag.find_all_with_article_counters |
42 | tags.should_have(2).entries |
43 | |
44 | tags.first.name.should == "foo" |
45 | tags.first.article_counter.should == 2 |
46 | |
47 | tags.last.name.should == 'bar' |
48 | tags.last.article_counter.should == 1 |
49 | end |
50 | |
51 | specify 'permalink_url should be of form /articles/tag/<name>' do |
52 | Tag.get('foo').permalink_url.should == 'http://myblog.net/articles/tag/foo' |
53 | end |
54 | end |