Sha256: a9e166b942eefc5a1cdd48805c264dd2988ddf9963da39b0cb8392e6edcd036d

Contents?: true

Size: 975 Bytes

Versions: 30

Compression:

Stored size: 975 Bytes

Contents

require 'spec_helper'

begin
  require 'genspec'
rescue LoadError
end

require 'generators/rollbar/rollbar_generator'

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 if Rails::VERSION::STRING.start_with?('3.0')

Version data entries

30 entries across 30 versions & 1 rubygems

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