Created
April 8, 2012 05:08
-
-
Save jakcharlton/2334892 to your computer and use it in GitHub Desktop.
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
describe ProgramsController do | |
let(:programs) { [mock_model(Program)] } | |
describe "GET index" do | |
it { should paginate(Program).with_default_per_page(30) } | |
describe "after pagination" do | |
before(:each) do | |
Program.stub(:paginate).and_return(programs) | |
get :index | |
end | |
it { should assign_to(:programs).with(programs) } | |
it { should respond_with(:success) } | |
it { should render_template(:index) } | |
it { should_not set_the_flash } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment