Created
October 20, 2013 03:22
-
-
Save inouetakuya/7064644 to your computer and use it in GitHub Desktop.
sample test which generates document with autodoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/requests/videos_spec.rb | |
require 'spec_helper' | |
describe '動画に関する API' do | |
describe "GET /api/videos.json" do | |
before do | |
@video1 = FactoryGirl.create(:brand, name: 'すぐにまたがる家庭教師') | |
@video2 = FactoryGirl.create(:brand, name: '夫のために身体を差し出す人妻') | |
get "/api/videos.json" | |
end | |
it '200 OK が返ってくる' do | |
expect(response).to be_success | |
expect(response.status).to eq(200) | |
end | |
it '動画一覧を取得できる', autodoc: true do | |
expect(response.body).to match(/すぐにまたがる家庭教師/) | |
expect(response.body).to match(/夫のために身体を差し出す人妻/) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment