Sha256: e57a8227da6fac1502af18c8b5231207d97a75489ebe3bda129b2267e3ab9d96
Contents?: true
Size: 880 Bytes
Versions: 5
Compression:
Stored size: 880 Bytes
Contents
require 'spec_helper' describe Diagnostic do let(:diagnostics) { Index.new.parse_translation_unit(fixture_path("list.c")).diagnostics } let(:diagnostic) { diagnostics.first } it "returns a string representation of the diagnostic" do str = diagnostic.format str.should be_kind_of(String) str.should =~ /does not match previous/ end it "returns a string representation according to the given opts" do diagnostic.format(:source_location => true).should include("list.c:5") end it "returns the text of the diagnostic" do diagnostic.spelling.should be_kind_of(String) end it "returns the severity of the diagnostic" do diagnostic.severity.should == :error end it "returns the ranges of the diagnostic" do rs = diagnostics[1].ranges rs.should be_kind_of(Array) rs.should_not be_empty rs.first.should be_kind_of(SourceRange) end end
Version data entries
5 entries across 5 versions & 1 rubygems