Sha256: 40866eee7f99eebf62ffd7d5e16e00f7f6e4f5699e08189126cda59ec98c0964
Contents?: true
Size: 767 Bytes
Versions: 2
Compression:
Stored size: 767 Bytes
Contents
require 'spec_helper' describe Fasterer::FileTraverser do include FileHelper include_context 'isolated environment' describe 'exit status should be' do context 'success' do it 'when no files exist' do `#{fasterer_bin}` expect($?.exitstatus).to eq(0) end it 'when no files with offenses exist' do create_file('user.rb', '[].sample') `#{fasterer_bin}` expect($?.exitstatus).to eq(0) end end context 'fail' do it 'when file with offenses exists' do create_file('user.rb', '[].shuffle.first') `#{fasterer_bin}` expect($?.exitstatus).to eq(1) end end end def fasterer_bin File.expand_path('../../../../bin/fasterer', __FILE__) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fasterer-0.2.0 | spec/lib/fasterer/cli_spec.rb |
fasterer-0.1.12 | spec/lib/fasterer/cli_spec.rb |