spec/rollbar_spec.rb in rollbar-2.0.2 vs spec/rollbar_spec.rb in rollbar-2.1.0
- old
+ new
@@ -442,11 +442,11 @@
config.project_gems = ['rails', 'rspec']
end
payload = notifier.send(:build_payload, 'info', 'message', nil, nil)
- payload['data'][:project_package_paths].should have(2).items
+ expect(payload['data'][:project_package_paths].count).to eq 2
end
it 'should include a code_version' do
notifier.configure do |config|
config.code_version = 'abcdef'
@@ -941,11 +941,11 @@
last_report = Rollbar.last_report
filepaths = last_report[:body][:trace][:frames].map {|frame| frame[:filename] }.reverse
expect(filepaths[0]).not_to include(gem_lib_dir)
- expect(filepaths.any? {|filepath| filepath.include?(gem_dir) }).to be_true
+ expect(filepaths.any? {|filepath| filepath.include?(gem_dir) }).to eq true
end
it 'should return the exception data with a uuid, on platforms with SecureRandom' do
if defined?(SecureRandom) and SecureRandom.respond_to?(:uuid)
exception_data = Rollbar.error(StandardError.new("oops"))
@@ -1359,11 +1359,11 @@
end
it 'should have use the Rails logger when configured to do so' do
configure
expect(Rollbar.send(:logger)).to be_kind_of(Rollbar::LoggerProxy)
- expect(Rollbar.send(:logger).object).should == ::Rails.logger
+ expect(Rollbar.send(:logger).object).to eq ::Rails.logger
end
it 'should use the default_logger when no logger is set' do
logger = Logger.new(STDERR)
@@ -1718,10 +1718,10 @@
end
describe '#custom_data' do
before do
Rollbar.configure do |config|
- config.custom_data_method = proc { raise 'this-will-raise' }
+ config.custom_data_method = proc { raise 'this-will-raise' }
end
expect_any_instance_of(Rollbar::Notifier).to receive(:error).and_return(report_data)
end