Sha256: 96c919d1b8daa7110d54ce4bb89e9168516708650966dddc83a8fca099a0a977

Contents?: true

Size: 286 Bytes

Versions: 4

Compression:

Stored size: 286 Bytes

Contents

module FileSystemStubs

  ##
  # stubs the filesystem methods that codependency
  # uses to retrieve file contents
  def file( filename, contents )
    File.stub( :exist?  ).with( filename ){ true }
    IO.stub( :readlines ).with( filename ){ contents.strip.split( /^\s+/ ) }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
codependency-1.0.0 spec/support/file_system_stubs.rb
codependency-0.3.1 spec/support/file_system_stubs.rb
codependency-0.3.0 spec/support/file_system_stubs.rb
codependency-0.2.0 spec/support/file_system_stubs.rb