require "spec_helper_#{ENV['SPEC_TARGET_BACKEND']}"

describe package('python-dev'), :if => ['debian', 'alpine'].include?(os[:family]) do
  it { should be_installed }
end

describe package('build-essential'), :if => os[:family] == 'debian' do
  it { should be_installed }
end

describe package('build-base'), :if => os[:family] == 'alpine' do
  it { should be_installed }
end

describe command('which python') do
  its(:exit_status) { should eq 0 }
end

require "spec_helper_#{ENV['SPEC_TARGET_BACKEND']}"

describe command('which java') do
  its(:exit_status) { should eq 0 }
end

describe command('which javac') do
  its(:exit_status) { should eq 0 }
end

describe command('javac ./Test.java && java Test') do
  before(:all) do
    File.write('Test.java', 'class Test {public static void main(String[] args){System.out.println("Hello");}}')
  end

  its(:stdout) { should contain('Hello') }

  after(:all) do
    File.delete('Test.java', 'Test.class')
  end
end

Add specs for Java compile/running.
Add specs for Java compile/running.
