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:
- 1465 Bytes
1 | require File.dirname(__FILE__) + '/../spec_helper' |
2 | |
3 | context 'Given a new test theme' do |
4 | setup do |
5 | @theme = Theme.new("test", "test") |
6 | end |
7 | |
8 | specify 'layout path should be "../../themes/test/layouts/default"' do |
9 | @theme.layout.should == "../../themes/test/layouts/default" |
10 | end |
11 | end |
12 | |
13 | context 'Given a the default theme' do |
14 | setup do |
15 | @theme = Blog.new.current_theme |
16 | end |
17 | |
18 | specify 'theme should be azure' do |
19 | @theme.name.should == 'azure' |
20 | end |
21 | |
22 | specify 'theme description should be correct' do |
23 | @theme.description.should == |
24 | File.open(RAILS_ROOT + '/themes/azure/about.markdown') {|f| f.read} |
25 | end |
26 | |
27 | specify 'theme_from_path should find the correct theme' do |
28 | Theme.theme_from_path(RAILS_ROOT + 'themes/azure').name.should == 'azure' |
29 | Theme.theme_from_path(RAILS_ROOT + 'themes/scribbish').name.should == 'scribbish' |
30 | end |
31 | |
32 | specify '#search_theme_path finds the right things' do |
33 | Theme.should_receive(:themes_root).and_return(RAILS_ROOT + '/test/mocks/themes') |
34 | Theme.search_theme_directory.collect{|t| File.basename(t)}.sort.should == |
35 | %w{ 123-numbers-in-path CamelCaseDirectory azure i-have-special-chars } |
36 | end |
37 | |
38 | specify 'find_all finds all the installed themes' do |
39 | Theme.find_all.collect{|t| t.name}.should_include(@theme.name) |
40 | Theme.find_all.size.should == |
41 | Dir.glob(RAILS_ROOT + '/themes/[a-zA-Z0-9]*').select do |file| |
42 | File.readable? "#{file}/about.markdown" |
43 | end.size |
44 | end |
45 | end |