1
0
Fork 0
mirror of https://github.com/rubyjs/libv8 synced 2023-03-27 23:21:48 -04:00
libv8/spec/compiler/clang_spec.rb

31 lines
668 B
Ruby
Raw Normal View History

2014-06-15 13:19:13 +03:00
require 'spec_helper'
require 'compiler'
module Libv8::Compiler
describe Clang do
subject { Clang.new 'c++' }
describe '#name' do
it 'returns clang' do
expect(subject.name).to eq 'clang'
2014-06-15 13:19:13 +03:00
end
end
describe '#version' do
it 'returns the version of the compiler' do
stub_as_available 'c++', :clang, '3.4.1'
expect(subject.version).to eq '3.4.1'
2014-06-15 13:19:13 +03:00
end
end
describe '#compatible?' do
context 'when clang\'s version is >= 3.1' do
it 'returns true' do
stub_as_available 'c++', :clang, '3.4.1'
expect(subject).to be_compatible
2014-06-15 13:19:13 +03:00
end
end
end
end
end