Permalink
Browse files

tweet登録機能のspecのひな形作成

  • Loading branch information...
utwang committed Mar 21, 2013
1 parent 6fc1bba commit c01d88028e78d7845cc796666df18eaae27f71ed
Showing with 15 additions and 2 deletions.
  1. +15 −2 spec/requests/tweet_pages_spec.rb
@@ -1,7 +1,9 @@
+#-*- coding: utf-8 -*-
+
require 'spec_helper'
-describe "TweetPages" do
- describe "GET /tweet_pages" do
+describe 'TweetPages' do
+ describe 'GET /tweet_pages' do
let!(:tweet) { create(:tweet) }
before { visit tweets_path }
@@ -23,4 +25,15 @@
it { Tweet.all.count.should == 4 }
end
end
+
+ describe 'POST /tweet' do
+ context '「TDD」とtweetするとき' do
+ before do
+ Tweet.create(content: 'TDD')
+ end
+
+ it { Tweet.all.last.content.should == 'TDD' }
+ end
+ end
end
+

0 comments on commit c01d880

Please sign in to comment.