Skip to content

Commit

Permalink
Add minimal specs for Terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
lowjoel committed May 14, 2018
1 parent 1d2ee12 commit ca87b1a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions spec/lexers/terraform_spec.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ca87b1a

Please sign in to comment.