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:
- 1149 Bytes
1 | require 'abstract_unit' |
2 | |
3 | module PeopleHelper |
4 | def title(text) |
5 | content_tag(:h1, text) |
6 | end |
7 | |
8 | def homepage_path |
9 | people_path |
10 | end |
11 | |
12 | def homepage_url |
13 | people_url |
14 | end |
15 | |
16 | def link_to_person(person) |
17 | link_to person.name, person |
18 | end |
19 | end |
20 | |
21 | class PeopleHelperTest < ActionView::TestCase |
22 | def setup |
23 | ActionController::Routing::Routes.draw do |map| |
24 | map.people 'people', :controller => 'people', :action => 'index' |
25 | map.connect ':controller/:action/:id' |
26 | end |
27 | end |
28 | |
29 | def test_title |
30 | assert_equal "<h1>Ruby on Rails</h1>", title("Ruby on Rails") |
31 | end |
32 | |
33 | def test_homepage_path |
34 | assert_equal "/people", homepage_path |
35 | end |
36 | |
37 | def test_homepage_url |
38 | assert_equal "http://test.host/people", homepage_url |
39 | end |
40 | |
41 | def test_link_to_person |
42 | person = mock(:name => "David") |
43 | expects(:mocha_mock_path).with(person).returns("/people/1") |
44 | assert_equal '<a href="/people/1">David</a>', link_to_person(person) |
45 | end |
46 | end |
47 | |
48 | class CrazyHelperTest < ActionView::TestCase |
49 | tests PeopleHelper |
50 | |
51 | def test_helper_class_can_be_set_manually_not_just_inferred |
52 | assert_equal PeopleHelper, self.class.helper_class |
53 | end |
54 | end |