Sha256: 9c9a8f1fccef074e62e602dd888a9dc7fc9ca44ddd380e350d1982d4b8b95200
Contents?: true
Size: 530 Bytes
Versions: 6
Compression:
Stored size: 530 Bytes
Contents
# coding: utf-8 RSpec.describe TTY::Pager::SystemPager, '#command_exists?' do subject(:pager) { described_class } it "successfully checks command exists on the system" do allow(TTY::Which).to receive(:exist?).with('less').and_return('/usr/bin/less').and_return(true) expect(pager.command_exists?('less')).to eq(true) end it "fails to check command exists on the system" do allow(TTY::Which).to receive(:exist?).with('less').and_return(false) expect(pager.command_exists?('less')).to eq(false) end end
Version data entries
6 entries across 6 versions & 1 rubygems