test/dirmon_entry_test.rb in rocketjob-3.0.0.rc2 vs test/dirmon_entry_test.rb in rocketjob-3.0.0.rc3
- old
+ new
@@ -34,25 +34,25 @@
describe '#job_class' do
describe 'with a nil job_class_name' do
it 'return nil' do
entry = RocketJob::DirmonEntry.new
- assert_equal(nil, entry.job_class)
+ assert_nil entry.job_class
end
end
describe 'with an unknown job_class_name' do
it 'return nil' do
entry = RocketJob::DirmonEntry.new(job_class_name: 'FakeJobThatDoesNotExistAnyWhereIPromise')
- assert_equal(nil, entry.job_class)
+ assert_nil entry.job_class
end
end
describe 'with a valid job_class_name' do
it 'return job class' do
entry = RocketJob::DirmonEntry.new(job_class_name: 'RocketJob::Job')
- assert_equal(RocketJob::Job, entry.job_class)
+ assert_equal RocketJob::Job, entry.job_class
assert_equal 0, entry.properties.size
end
end
end
@@ -229,11 +229,11 @@
@entry.archive_directory = nil
files = []
@entry.each do |file_name|
files << file_name
end
- assert_equal nil, @entry.archive_directory
+ assert_nil @entry.archive_directory
assert_equal 1, files.count
assert_equal Pathname.new('test/files/text.txt').realpath, files.first
end
it 'with archive path' do
@@ -261,11 +261,11 @@
@entry.stub(:whitelist_paths, [Pathname.new('test/files').realpath.to_s]) do
@entry.each do |file_name|
files << file_name
end
end
- assert_equal nil, @entry.archive_directory
+ assert_nil @entry.archive_directory
assert_equal 1, files.count
assert_equal Pathname.new('test/files/text.txt').realpath, files.first
end
it 'skips paths outside of the whitelist' do
@@ -274,10 +274,10 @@
@entry.stub(:whitelist_paths, [Pathname.new('test/config').realpath.to_s]) do
@entry.each do |file_name|
files << file_name
end
end
- assert_equal nil, @entry.archive_directory
+ assert_nil @entry.archive_directory
assert_equal 0, files.count
end
end
end