Sha256: 62e4045ae479db3e73cd58982d985ef7f011fc336a35889435d9e41324d5231a

Contents?: true

Size: 610 Bytes

Versions: 2

Compression:

Stored size: 610 Bytes

Contents

require 'spec_helper'

describe PerformanceController do
  before :each do
    @context = double(:context)
    @controller = PerformanceController.new(context: @context)
  end

  describe 'warning action' do
    it 'should render warning template' do
      @context.should_receive(:haml).with('performance/warning'.to_sym, anything)
      @controller.warning
    end
  end

  describe 'check action' do
    it 'should render check template' do
      Backend.stub(:performance_stats){ {} }
      @context.should_receive(:haml).with('performance/check'.to_sym, anything)
      @controller.check
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
redis_monitor-0.0.5 spec/controllers/performance_controller_spec.rb
redis_monitor-0.0.4 spec/controllers/performance_controller_spec.rb