Sha256: be643f01588e1d4802d67c07579ac0601860708d03633f7df37bcbe8bb289952
Contents?: true
Size: 896 Bytes
Versions: 1
Compression:
Stored size: 896 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe SimplePagesController do render_views context "when the template doesn't exist" do before { get :show, :id => 'nothing' } it { should render_template 'not_found' } it { response.should be_not_found } end context "when the template exists" do before { get :show, :id => 'testing' } it { should render_template 'testing' } it { response.should be_success } end context "when the template and action exist" do before { get :show, :id => 'plus' } it { should render_template 'plus' } it { response.should be_success } it { response.body.should =~ /1/ } end context "when the action exists but not the template" do before { get :show, :id => 'minus' } it { should render_template 'show' } it { response.should be_success } it { response.body.should =~ /\-1/ } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simple_pages-0.1.0 | spec/controllers/simple_pages_controller_spec.rb |