Sha256: 3ce2e20f18383113cc99d00f5a356341e5feb13995607d3b4b057f167732ba12

Contents?: true

Size: 519 Bytes

Versions: 1

Compression:

Stored size: 519 Bytes

Contents

require 'spec_helper'

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

  describe 'index action' do
    before :each do
      Backend.stub(:info){ {} }
    end

    it 'should not fail' do
      @context.stub(:haml)
      expect{ @controller.index }.not_to raise_error
    end

    it 'should render info page' do
      @context.should_receive(:haml).with('info/info'.to_sym, anything)
      @controller.index
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
redis_monitor-0.0.3 spec/controllers/info_controller_spec.rb