Sha256: 7af923046d0652ffb5626aa931a5b8f2c820345c3fb21038f79323fef4bc2695
Contents?: true
Size: 633 Bytes
Versions: 51
Compression:
Stored size: 633 Bytes
Contents
require 'spec_helper' describe RightSupport::Ruby::ObjectExtensions do context :require_succeeds? do it 'yields to its block when the require succeeds' do @canary = false # The 'set' source file ships with Ruby standard library and should # always be available if require_succeeds?('set') @canary = true end @canary.should == true end it 'does not yield when require fails for any reason' do @canary = false if require_succeeds?('a_source_file_with_a_wholly_improbable_name') @canary = true end @canary.should == false end end end
Version data entries
51 entries across 51 versions & 1 rubygems