test/application_test.rb in florida-0.0.1 vs test/application_test.rb in florida-0.0.2
- old
+ new
@@ -1,10 +1,20 @@
$:.unshift File.expand_path('../lib/', File.dirname(__FILE__))
require 'florida'
-class MyApplication < Florida::Application
- get '/' do
- 'Hello Florida!!'
+class HomeController < Florida::Controller::Base
+ def index
+ 'Hello Index!!'
end
+
+ def show(id)
+ "This page is #{id}"
+ end
end
-MyApplication.run
+class MyApplication < Florida::Application::Base
+ routings do
+ path "/home", to: HomeController
+ end
+end
+
+Florida::SinatraServer.run(MyApplication)