Sha256: 8e1633fe5c18facf4e60dcaf985861e0d086d8ab7777aa2bf743e1ca2fb11e7c

Contents?: true

Size: 834 Bytes

Versions: 107

Compression:

Stored size: 834 Bytes

Contents

require 'spec_helper'

describe :rollbar do
  context "with no arguments" do
    it "outputs a help message" do
      subject.should output(/You'll need to add an environment variable ROLLBAR_ACCESS_TOKEN with your access token/)
    end

    it "generates a Rollbar initializer with ENV" do
      subject.should generate("config/initializers/rollbar.rb") { |content|
        content.should =~ /config.access_token = ENV\['ROLLBAR_ACCESS_TOKEN'\]/
      }
    end
  end

  with_args 'aaaabbbbccccddddeeeeffff00001111' do
    it "generates a Rollbar initializer with access token" do
      subject.should generate("config/initializers/rollbar.rb") do |content|
        content.should =~ /aaaabbbbccccddddeeeeffff00001111/
        content.should =~ /config.access_token = 'aaaabbbbccccddddeeeeffff00001111'/
      end
    end
  end
end

Version data entries

107 entries across 107 versions & 1 rubygems

Version Path
rollbar-2.8.3 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.8.2 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.8.1 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.8.0 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.7.1 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.7.0 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.6.3 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.6.2 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.6.1 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.6.0 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.5.2 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.5.1 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.5.0 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.4.0 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.3.0 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.2.1 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.2.0 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.1.2 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.1.1 spec/generators/rollbar/rollbar_generator_spec.rb
rollbar-2.1.0 spec/generators/rollbar/rollbar_generator_spec.rb