spec/beaker/host/mac/exec_spec.rb in beaker-4.21.0 vs spec/beaker/host/mac/exec_spec.rb in beaker-4.22.0
- old
+ new
@@ -29,7 +29,17 @@
expect(Beaker::Command).not_to receive(:new).with("sudo selinuxenabled")
expect(instance).not_to receive(:exec).with(0, :accept_all_exit_codes => true)
expect(instance.selinux_enabled?).to be === false
end
end
+
+ describe '#modified_at' do
+ it 'calls execute with touch and timestamp' do
+ time = '190101010000'
+ path = '/path/to/file'
+ expect( instance ).to receive(:execute).with("touch -mt #{time} #{path}").and_return(0)
+
+ instance.modified_at(path, time)
+ end
+ end
end
end