diff --git a/spec/controllers/asciicasts_controller_spec.rb b/spec/controllers/asciicasts_controller_spec.rb index 0803143..c9fc242 100644 --- a/spec/controllers/asciicasts_controller_spec.rb +++ b/spec/controllers/asciicasts_controller_spec.rb @@ -94,6 +94,18 @@ describe AsciicastsController do it { should be_success } end + + context 'for js request' do + let(:asciicast) { FactoryGirl.build(:asciicast, :id => 666) } + + before do + ViewCounter.should_not_receive(:new) + + get :show, :id => asciicast.id, :format => :js + end + + it { should be_success } + end end describe '#edit' do