Sha256: ef15109cb1e637b06ff954649fba0d87c1bc10a093bf713bc33f2b35534bf6d9

Contents?: true

Size: 721 Bytes

Versions: 1

Compression:

Stored size: 721 Bytes

Contents

require 'spec_helper'
require 'stringio'

describe 'log note' do

  def page
    Capybara::Node::Simple.new(response.body)
  end

  class ApplicationController < ActionController::Base
  end

  controller do
    def index
      Rails.logger.error 'foo'
      Rails.logger.warn 'bar'
      render :text => '<html><head></head><body></body></html>', :content_type => 'text/html'
    end
  end

  before :all do
    Footnotes.enabled = true
  end

  after :all do
    Footnotes.enabled = false
  end

  it 'Includes the log in the response' do
    get :index
    log_debug = first('fieldset#log_debug_info div', :visible => false)
    log_debug.should have_content('foo')
    log_debug.should have_content('bar')
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails-footnotes-4.1.6 spec/controllers/log_note_controller_spec.rb