File tree Expand file tree Collapse file tree 2 files changed +29
-2
lines changed
Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,10 @@ def collections
2727 . map { Collection . new ( it ) }
2828 end
2929
30- def collection ( name )
31- Collection . new ( name )
30+ def collection ( name ) = Collection . new ( name )
31+
32+ def data ( name )
33+ Perron ::Data . new ( name )
3234 end
3335 end
3436end
Original file line number Diff line number Diff line change 1+ require "test_helper"
2+
3+ require "fileutils"
4+
5+ class SiteTest < ActiveSupport ::TestCase
6+ setup do
7+ Perron . configure do |config |
8+ config . site_name = "Test Site"
9+ config . site_email = "[email protected] " 10+ config . default_url_options = { protocol : "https" , host : "example.com" }
11+ end
12+ end
13+
14+ test ".name returns the name from the configuration" do
15+ assert_equal "Test Site" , Perron ::Site . name
16+ end
17+
18+ test ".email returns the email from the configuration" do
19+ assert_equal "[email protected] " , Perron ::
Site . email 20+ end
21+
22+ test ".url builds the URL from the configuration" do
23+ assert_equal "https://example.com" , Perron ::Site . url
24+ end
25+ end
You can’t perform that action at this time.
0 commit comments