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:
- 1121 Bytes
1 | require File.dirname(__FILE__) + '/../spec_helper' |
2 | |
3 | describe Status, "attributes" do |
4 | before :all do |
5 | @status = Status.new(:id => 1, :name => 'Test') |
6 | end |
7 | |
8 | specify 'id' do |
9 | @status.id.should == 1 |
10 | end |
11 | |
12 | specify 'symbol' do |
13 | @status.name.should == 'Test' |
14 | end |
15 | |
16 | specify 'name' do |
17 | @status.symbol.should == :test |
18 | end |
19 | end |
20 | |
21 | describe Status, 'find' do |
22 | it 'should find by number ID' do |
23 | Status.find(1).id.should == 1 |
24 | end |
25 | |
26 | it 'should find by string ID' do |
27 | Status.find('1').id.should == 1 |
28 | end |
29 | |
30 | it 'should find nil when status with ID does not exist' do |
31 | Status.find(0).should be_nil |
32 | end |
33 | end |
34 | |
35 | describe Status, 'brackets' do |
36 | it 'should allow you to look up with a symbol' do |
37 | Status[:draft].name.should == 'Draft' |
38 | end |
39 | |
40 | it 'should return nil if symbol is not associated with a status' do |
41 | Status[:whatever].should == nil |
42 | end |
43 | end |
44 | |
45 | describe Status, 'find_all' do |
46 | it 'should return all statuses as Status objects' do |
47 | statuses = Status.find_all |
48 | statuses.size.should > 0 |
49 | statuses.each do |status| |
50 | status.should be_kind_of(Status) |
51 | end |
52 | end |
53 | end |