Sha256: 69253115f0e3d80c01a0faa1b2c67f8ea5533f2808c8a5f8e063173336d0b190
Contents?: true
Size: 529 Bytes
Versions: 1
Compression:
Stored size: 529 Bytes
Contents
require 'spec_helper' describe Popolo::PostsController do before :each do @routes = Popolo::Engine.routes @post = FactoryGirl.create :post end describe 'GET index' do it 'assigns all posts as @posts' do get :index assigns(:posts).to_a.should == [@post] response.should be_success end end describe 'GET show' do it 'assigns the requested post as @post' do get :show, id: @post.id.to_s assigns(:post).should == @post response.should be_success end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
popolo-0.0.2 | spec/controllers/popolo/posts_controller_spec.rb |