diff --git a/spec/lexers/terraform_spec.rb b/spec/lexers/terraform_spec.rb new file mode 100644 index 0000000000..3465c23d1c --- /dev/null +++ b/spec/lexers/terraform_spec.rb @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- # + +describe Rouge::Lexers::Terraform do + let(:subject) { Rouge::Lexers::Terraform.new } + + include Support::Lexing + it 'parses a basic shell string' do + tokens = subject.lex('terraform {}').to_a + assert { tokens.size == 3 } + assert { tokens.first[0] == Token['Name.Variable'] } + end + + describe 'guessing' do + include Support::Guessing + + it 'guesses by filename' do + assert_guess :filename => 'foo.tf' + deny_guess :filename => 'foo' + end + + it 'guesses by mimetype' do + end + + it 'guesses by source' do + end + end +end