spec/command_spec.rb in lint_trap-0.0.13 vs spec/command_spec.rb in lint_trap-0.0.14

- old
+ new

@@ -4,10 +4,12 @@ let(:file){fixture_path('lint.txt')} let(:command){described_class.new('cat', %w(-b), [file])} let(:container){LintTrap::Container::Docker.new('lintci/rubocop', fixture_path)} describe '#run' do + let(:container){LintTrap::Container::Docker.new('lintci/rubocop', fixture_path, remove_container: ENV['CI'].nil?)} + it 'generates the expected output' do success = command.run(container) do |io| expect(io.read).to eq(" 1\tlint\n") end @@ -16,10 +18,10 @@ end describe '#command/#to_s' do it 'generates a wrapped executable command' do expect(command.to_s(container)).to eq( - 'docker run --net="none" --privileged=false '\ + 'docker run --rm --net="none" --privileged=false '\ "-v #{LintTrap::Container::Base::LOCAL_CONFIG_PATH}:/config "\ "-v #{fixture_path}:/src --workdir=/src --user=lint_trap lintci/rubocop "\ 'cat -b /src/lint.txt' ) end