|
| 1 | +# Git Pivotal Tracker Integration |
| 2 | +# Copyright (c) 2013 the original author or authors. |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | + |
| 16 | +require 'spec_helper' |
| 17 | +require 'open3' |
| 18 | + |
| 19 | +describe 'detect' do |
| 20 | + |
| 21 | + it 'should return non-zero if the application is not Java' do |
| 22 | + Open3.popen3("#{DETECT} #{FIXTURES_DIR}/non-java") do |stdin, stdout, stderr, wait_thr| |
| 23 | + expect(stdout.read).to eq('') |
| 24 | + expect(stderr.read).to eq('') |
| 25 | + expect(wait_thr.value).to_not be_success |
| 26 | + end |
| 27 | + end |
| 28 | + |
| 29 | + it 'should return zero if the application is Java' do |
| 30 | + # TODO Implement test as things are filled out |
| 31 | + end |
| 32 | + |
| 33 | + it 'should print the names of participating components if the application is Java' do |
| 34 | + # TODO Implement test as things are filled out |
| 35 | + end |
| 36 | + |
| 37 | + it 'should return non-zero if an error occurs' do |
| 38 | + # TODO Implement test as things are filled out |
| 39 | + end |
| 40 | + |
| 41 | + it 'should print the error message if an error occurs' do |
| 42 | + # TODO Implement test as things are filled out |
| 43 | + end |
| 44 | + |
| 45 | + private |
| 46 | + |
| 47 | + DETECT = File.expand_path('../../../bin/detect', __FILE__) |
| 48 | + FIXTURES_DIR = File.expand_path('../../fixtures', __FILE__) |
| 49 | + |
| 50 | +end |
0 commit comments