Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
テストが通るように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
YOSHIDA Hiroki committed Jan 10, 2014
1 parent 30bb36a commit bf5f827
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions spec/controllers/home_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,11 @@

describe "GET 'index'" do
subject { get :index }

context "未ログインの場合" do
it "ゲスト向けのページが描画されること" do
expect(subject).to render_template(:guest)
end
end

context "ログイン済みの場合" do
before_sign_in

it "ログインユーザー向けのページが描画されること" do
expect(subject).to render_template(:index)
end
end
it { should render_template(:index) }
end

describe "GET 'bookmarklet'" do
subject { get :bookmarklet }

context "未ログインの場合" do
it "ゲスト向けのページが描画されること" do
expect(subject).to render_template(:guest)
end
end

context "ログイン済みの場合" do
before_sign_in

it "ブックマークレットのページが描画されること" do
expect(subject).to render_template(:bookmarklet)
end
end
it { should render_template(:bookmarklet) }
end
end

0 comments on commit bf5f827

Please sign in to comment.