Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 1124 Bytes
1 | require File.dirname(__FILE__) + '/../spec_helper' |
2 | |
3 | describe Snippet do |
4 | dataset :snippets |
5 | test_helper :validations |
6 | |
7 | before :each do |
8 | @snippet = @model = Snippet.new(snippet_params) |
9 | end |
10 | |
11 | it 'should validate length of' do |
12 | { |
13 | :name => 100, |
14 | :filter_id => 25 |
15 | }.each do |field, max| |
16 | assert_invalid field, ('this must not be longer than %d characters' % max), 'x' * (max + 1) |
17 | assert_valid field, 'x' * max |
18 | end |
19 | end |
20 | |
21 | it 'should validate presence of' do |
22 | [:name].each do |field| |
23 | assert_invalid field, 'this must not be blank', '', ' ', nil |
24 | end |
25 | end |
26 | |
27 | it 'should validate uniqueness of' do |
28 | assert_invalid :name, 'this name is already in use', 'first', 'another', 'markdown' |
29 | assert_valid :name, 'just-a-test' |
30 | end |
31 | |
32 | it 'should validate format of name' do |
33 | assert_valid :name, 'abc', 'abcd-efg', 'abcd_efg', 'abc.html', '/', '123' |
34 | assert_invalid :name, 'cannot contain spaces or tabs' |
35 | end |
36 | |
37 | it 'should allow the filter to be specified' do |
38 | @snippet = snippets(:markdown) |
39 | @snippet.filter.should be_kind_of(MarkdownFilter) |
40 | end |
41 | end |