Sha256: c5f34a5b014777eaaa0059d9338b3a115f8981d82bda6c8879e82cf5db46c1bd
Contents?: true
Size: 1 KB
Versions: 1
Compression:
Stored size: 1 KB
Contents
# encoding: utf-8 require 'cliver' describe Cliver do it { should respond_to :assert } it { should respond_to :dependency_unmet? } context '#dependency_unmet?' do let(:requirements) { [] } let(:detector) { proc { } } subject { Cliver.dependency_unmet?(executable, *requirements, &detector) } context 'when dependency is met' do let(:executable) { 'ruby' } it { should be_false } end context 'when dependency is present, but wrong version' do let(:executable) { 'ruby' } let(:requirements) { ['~>0.1.0'] } let(:detector) { proc { RUBY_VERSION.sub('p', '.') } } it { should_not be_false } it { should match 'Dependency Version Mismatch:' } it { should match "expected 'ruby' to be #{requirements}" } end context 'when dependency is not present' do let(:executable) { 'ruxxxby' } it { should_not be_false } it { should match 'Dependency Not Found:' } it { should match "'#{executable}' missing" } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cliver-0.1.3 | spec/cliver_spec.rb |