- before {
- Facter.fact(:osfamily).stubs(:value).returns 'Debian'
- File.stubs(:exists?).returns true
- File.stubs(:mtime).returns 1407660561
- }
- it 'should have the value of the mtime of the file' do
- is_expected.to eq(1407660561)
+ it 'has the value of the mtime of the file' do
+ allow(Facter.fact(:osfamily)).to receive(:value).and_return('Debian')
+ allow(File).to receive(:exist?).and_return(true)
+ allow(File).to receive(:mtime).and_return(1_407_660_561)
+ expect(subject).to eq(1_407_660_561)