Sha256: 4f12853975b5c33c9dda048e2d94285c277eee5b990bee43694d18964af9ab8b
Contents?: true
Size: 714 Bytes
Versions: 23
Compression:
Stored size: 714 Bytes
Contents
require 'spec_helper' describe MyDashboard::DashboardsController do before do @routes = MyDashboard::Engine.routes end describe 'GET "index"' do def action get :index end it 'responds success' do action expect(response).to be_success end end describe 'GET "show"' do def action(params = {}) get :show, params end context 'when template exists' do it 'responds success' do action(name: 'foo') expect(response).to be_success end end context 'when template does not exist' do it { expect { action }.to raise_error } it { expect { action(name: 'bar') }.to raise_error } end end end
Version data entries
23 entries across 23 versions & 1 rubygems