Commit 2694ba7807080fccc61408c7fc21b22506d417e2
- Date: Wed Apr 16 06:22:27 +0000 2008
- Committer: Slurry (socialface@gmail.com)
- Author: Slurry (socialface@gmail.com)
- Commit SHA1: 2694ba7807080fccc61408c7fc21b22506d417e2
- Tree SHA1: e4eea05266f78690d6df7079b167cb0818a331b8
Created our Posts controller and specified a single #index action.
Commit diff
| |   |
| 1 | class Posts < Application |
| 2 | |
| 3 | def index |
| 4 | render |
| 5 | end |
| 6 | |
| 7 | end |
| toggle raw diff |
--- /dev/null
+++ b/app/controllers/posts.rb
@@ -0,0 +1,7 @@
+class Posts < Application
+
+ def index
+ render
+ end
+
+end |
| |   |
| 1 | module Merb |
| 2 | module PostsHelper |
| 3 | |
| 4 | end |
| 5 | end |
| toggle raw diff |
--- /dev/null
+++ b/app/helpers/posts_helper.rb
@@ -0,0 +1,5 @@
+module Merb
+ module PostsHelper
+
+ end
+end
\ No newline at end of file |
| |   |
| 1 | You're in index of the Posts |
| toggle raw diff |
--- /dev/null
+++ b/app/views/posts/index.html.erb
@@ -0,0 +1 @@
+You're in index of the Posts
\ No newline at end of file |
| |   |
| 33 | 33 | ~ [4;36;1mSQL (0.000333)[0m [0;1mSET NAMES 'utf8'[0m |
| 34 | 34 | ~ [4;35;1mSQL (0.000126)[0m [0mSET SQL_AUTO_IS_NULL=0[0m |
| 35 | 35 | ~ [4;36;1mPost Columns (0.002168)[0m [0;1mSHOW FIELDS FROM `posts`[0m |
| 36 | ~ Loaded TEST Environment... |
| 37 | ~ loading gem 'merb_activerecord' from ... |
| 38 | ~ loading gem 'merb_helpers' from ... |
| 39 | ~ loading gem 'activerecord' from ... |
| 40 | ~ Connecting to database... |
| 41 | ~ Compiling routes... |
| 42 | ~ Using 'share-nothing' cookie sessions (4kb limit per client) |
| 43 | ~ {:action_time=>0.023912, :before_filters_time=>1.6e-05, :after_filters_time=>9.0e-06} |
| toggle raw diff |
--- a/log/merb_test.log
+++ b/log/merb_test.log
@@ -33,3 +33,11 @@ Wed, 16 Apr 2008 06:05:40 GMT ~ info ~ Logfile created
~ [4;36;1mSQL (0.000333)[0m [0;1mSET NAMES 'utf8'[0m
~ [4;35;1mSQL (0.000126)[0m [0mSET SQL_AUTO_IS_NULL=0[0m
~ [4;36;1mPost Columns (0.002168)[0m [0;1mSHOW FIELDS FROM `posts`[0m
+ ~ Loaded TEST Environment...
+ ~ loading gem 'merb_activerecord' from ...
+ ~ loading gem 'merb_helpers' from ...
+ ~ loading gem 'activerecord' from ...
+ ~ Connecting to database...
+ ~ Compiling routes...
+ ~ Using 'share-nothing' cookie sessions (4kb limit per client)
+ ~ {:action_time=>0.023912, :before_filters_time=>1.6e-05, :after_filters_time=>9.0e-06} |
| |   |
| 1 | require File.join(File.dirname(__FILE__), "..", 'spec_helper.rb') |
| 2 | |
| 3 | describe Posts, "#index" do |
| 4 | |
| 5 | it "should respond correctly" do |
| 6 | dispatch_to( Posts, :index ).should respond_successfully |
| 7 | end |
| 8 | |
| 9 | end |
| toggle raw diff |
--- /dev/null
+++ b/spec/controllers/posts_spec.rb
@@ -0,0 +1,9 @@
+require File.join(File.dirname(__FILE__), "..", 'spec_helper.rb')
+
+describe Posts, "#index" do
+
+ it "should respond correctly" do
+ dispatch_to( Posts, :index ).should respond_successfully
+ end
+
+end
\ No newline at end of file |
| |   |
| 1 | require File.join(File.dirname(__FILE__), "..", 'spec_helper.rb') |
| 2 | |
| 3 | describe Merb::PostsHelper do |
| 4 | |
| 5 | end |
| toggle raw diff |
--- /dev/null
+++ b/spec/helpers/posts_helper_spec.rb
@@ -0,0 +1,5 @@
+require File.join(File.dirname(__FILE__), "..", 'spec_helper.rb')
+
+describe Merb::PostsHelper do
+
+end
\ No newline at end of file |