Sha256: 66dddc72ebef3dbd21c459b575e78ef0a28df7a35b122f1e22ea62327d186240
Contents?: true
Size: 706 Bytes
Versions: 5
Compression:
Stored size: 706 Bytes
Contents
require 'spec_helper' describe Dashing::DashboardsController do before do @routes = Dashing::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
5 entries across 5 versions & 1 rubygems