Sha256: ca9aaab7cbe69db533fdee838434241071de67400c472d4308f9285c6f5cf60b

Contents?: true

Size: 613 Bytes

Versions: 27

Compression:

Stored size: 613 Bytes

Contents

require 'spec_helper'

describe ApplicationController, :type => 'request' do
  before do
    Rollbar.configure do |config|
      config.js_options = { :foo => :bar }
      config.js_enabled = true
    end
  end

  it 'renders the snippet and config in the response', :type => 'request' do
    get '/test_rollbar_js'

    snippet_from_submodule = File.read(File.expand_path('../../../../rollbar.js/dist/rollbar.snippet.js', __FILE__))

    expect(response.body).to include("var _rollbarConfig = #{Rollbar::configuration.js_options.to_json};")
    expect(response.body).to include(snippet_from_submodule)
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
rollbar-2.18.2 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.18.0 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.17.0 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.16.4 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.16.3 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.16.2 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.16.0 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.15.6 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.15.5 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.15.4 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.15.3 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.15.2 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.15.1 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.15.0 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.14.1 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.14.0 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.13.3 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.13.2 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.13.1 spec/rollbar/plugins/rails_js_spec.rb
rollbar-2.13.0 spec/rollbar/plugins/rails_js_spec.rb