Sha256: aabe3f7f6418ddde414e2296c6a6e46d8870516fbf5f3528174c05d15448dc94

Contents?: true

Size: 493 Bytes

Versions: 1

Compression:

Stored size: 493 Bytes

Contents

# coding: utf-8
require 'spec_helper'

describe RoomsController do
  describe 'me!' do
    let!(:user) { User.create!(name: 'akiinyo') }

    subject &:response

    context 'ログインしている場合' do
      before {
        controller.sign_in user
        get :index
      }

      it { should render_template('index') }
    end

    context 'ログインしていない場合' do
      before {
        get :index
      }

      it { should redirect_to(root_url) }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
current_me-0.0.3 spec/dummy/spec/controllers/rooms_controller_spec.rb