Advertisement
fatmcgav

Negative stub test 2

Jan 21st, 2014
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.28 KB | None | 0 0
  1.       it "should fail an invalid file path" do
  2.         File.stubs(:exists?).returns(:false)
  3.         File.expects(:exists?)
  4.         expect { described_class.new(:domainname => 'domain', :passwordfile => '/tmp/nonexistent') }.to raise_error(Puppet::Error, /does not exist/)
  5.       end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement