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:
- 2006 Bytes
1 | require File.dirname(__FILE__) + "/../../spec_helper" |
2 | |
3 | class MarkdownPlusFilter |
4 | # dummy filter class |
5 | end |
6 | |
7 | describe Admin::PagesHelper do |
8 | dataset :users_and_pages |
9 | |
10 | before :each do |
11 | @page = mock_model(Page) |
12 | @errors = mock("errors") |
13 | @page.stub!(:errors).and_return(@errors) |
14 | helper.instance_variable_set(:@page, @page) |
15 | end |
16 | |
17 | it "should have meta errors if the page has errors on the slug" do |
18 | @errors.should_receive(:[]).with(:slug).and_return("Error") |
19 | helper.meta_errors?.should be_true |
20 | end |
21 | |
22 | it "should have meta errors if the page has errors on the breadcrumb" do |
23 | @errors.should_receive(:[]).with(:slug).and_return(nil) |
24 | @errors.should_receive(:[]).with(:breadcrumb).and_return("Error") |
25 | helper.meta_errors?.should be_true |
26 | end |
27 | |
28 | it "should render the tag reference" do |
29 | helper.should_receive(:render).at_least(:once).and_return("Tag Reference") |
30 | helper.tag_reference.should =~ /Tag Reference/ |
31 | end |
32 | |
33 | describe "filter_reference" do |
34 | it "should determine the filter reference from the first part on the current page" do |
35 | helper.instance_variable_set :@page, pages(:home) |
36 | helper.filter.should be_kind_of(TextFilter) |
37 | end |
38 | |
39 | it "should render the filter reference" do |
40 | helper.stub!(:filter).and_return(TextileFilter) |
41 | helper.filter_reference.should == TextileFilter.description |
42 | end |
43 | |
44 | it "should render the filter reference for complex filter names" do |
45 | MarkdownPlusFilter.stub!(:description).and_return("Markdown rocks!") |
46 | helper.stub!(:filter).and_return(MarkdownPlusFilter) |
47 | helper.filter_reference.should == "Markdown rocks!" |
48 | end |
49 | end |
50 | |
51 | it "should have a default filter name" do |
52 | @page.should_receive(:parts).and_return([]) |
53 | helper.default_filter_name.should == "" |
54 | end |
55 | |
56 | it "should find the homepage" do |
57 | helper.homepage.should == pages(:home) |
58 | end |
59 | |
60 | it "should render javascript for the page editing form" do |
61 | helper.should respond_to(:page_edit_javascripts) |
62 | end |
63 | end |