spec/rollbar_spec.rb in rollbar-2.9.1 vs spec/rollbar_spec.rb in rollbar-2.10.0
- old
+ new
@@ -232,10 +232,11 @@
let!(:notifier) { Rollbar::Notifier.new }
let(:scope) { { :bar => :foo } }
let(:configuration) do
config = Rollbar::Configuration.new
config.enabled = true
+ config.access_token = test_access_token
config
end
let(:message) { 'message' }
let(:exception) { Exception.new }
let(:extra) { {:foo => :bar } }
@@ -1754,12 +1755,13 @@
Rollbar.configure do |config|
config.project_gems = gems
end
- gems.each {|gem|
- gem_paths.push(Gem::Specification.find_by_name(gem).gem_dir)
- }
+ gem_paths = gems.map do |gem|
+ gem_spec = Gem::Specification.find_all_by_name(gem)[0]
+ gem_spec.gem_dir if gem_spec
+ end.compact
data = notifier.send(:build_payload, 'info', 'test', nil, {})['data']
data[:project_package_paths].kind_of?(Array).should == true
data[:project_package_paths].length.should == gem_paths.length