test/file_item_test.rb in adrian-1.1.2 vs test/file_item_test.rb in adrian-1.2.0

- old
+ new

@@ -57,9 +57,20 @@ it 'updates the path to its new location' do @item.move(@destination) assert_equal @destination, File.dirname(@item.path) end + it 'logs the move on the logger' do + destination_file_name = File.join(@destination, File.basename(@item.path)) + logger = MiniTest::Mock.new + logger.expect(:info, nil, ["Moving #{@item.path} to #{destination_file_name}"]) + @item.logger = logger + + @item.move(@destination) + + logger.verify + end + end describe 'touch' do it 'changes the update timestamp to the current time' do