Sha256: bb7e3aee12502f27e7f9579801e174d3374e7d3b9167f76eb537c8ea80d9ad5f
Contents?: true
Size: 695 Bytes
Versions: 2
Compression:
Stored size: 695 Bytes
Contents
#!/usr/bin/env rspec require 'spec_helper' require 'noms/command' describe NOMS::Command do before(:all) do setup_fixture 'test' File.open('test/foo.txt', 'w') do |fh| fh << <<-TEXT.gsub(/^\s+/,'') 1: Test output 2: from foo.txt TEXT end end after(:all) { teardown_fixture 'test' } describe '.run' do context 'with one file argument' do it 'shows the file contents' do file = 'file://' + File.join(Dir.pwd, 'test', 'foo.txt') expect { NOMS::Command.run([file]) }.to output(/from foo.txt/).to_stdout end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
noms-command-2.1.1 | spec/01noms-command_spec.rb |
noms-command-0.5.0 | spec/01noms-command_spec.rb |