Skip to content
This repository
Browse code

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

  • Loading branch information...
commit c01d88028e78d7845cc796666df18eaae27f71ed 1 parent 6fc1bba
utwang authored March 21, 2013

Showing 1 changed file with 15 additions and 2 deletions. Show diff stats Hide diff stats

  1. 17  spec/requests/tweet_pages_spec.rb
17  spec/requests/tweet_pages_spec.rb
... ...
@@ -1,7 +1,9 @@
  1
+#-*- coding: utf-8 -*-
  2
+
1 3
 require 'spec_helper'
2 4
 
3  
-describe "TweetPages" do
4  
-  describe "GET /tweet_pages" do
  5
+describe 'TweetPages' do
  6
+  describe 'GET /tweet_pages' do
5 7
     let!(:tweet) { create(:tweet) }
6 8
 
7 9
     before { visit tweets_path }
@@ -23,4 +25,15 @@
23 25
       it { Tweet.all.count.should == 4 }
24 26
     end
25 27
   end
  28
+
  29
+  describe 'POST /tweet' do
  30
+    context '「TDD」とtweetするとき' do
  31
+      before do
  32
+        Tweet.create(content: 'TDD')
  33
+      end
  34
+
  35
+      it { Tweet.all.last.content.should == 'TDD' }
  36
+    end
  37
+  end
26 38
 end
  39
+

0 notes on commit c01d880

Please sign in to comment.
Something went wrong with that request. Please try again.