Sha256: 06d9e799c29fa503d573794bafb5b1678feffbe0ff12a49c755fac4a257b0e7e

Contents?: true

Size: 381 Bytes

Versions: 2

Compression:

Stored size: 381 Bytes

Contents

require 'rails_helper'

module Popolo
  RSpec.describe PostsController, type: :controller do
    routes { Engine.routes }

    before :each do
      @post = FactoryGirl.create(:post)
    end

    describe 'GET show' do
      it 'assigns the requested post as @post' do
        get :show, {id: @post.to_param}
        expect(assigns(:post)).to eq(@post)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
popolo-0.1.1 spec/controllers/popolo/posts_controller_spec.rb
popolo-0.1.0 spec/controllers/popolo/posts_controller_spec.rb