diff --git a/.gitignore b/.gitignore index 6061f25a..0f474415 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .irbrc /Gemfile.lock /pkg/ +coverage/ diff --git a/Gemfile b/Gemfile index 4e25d9a2..ab873682 100644 --- a/Gemfile +++ b/Gemfile @@ -8,3 +8,4 @@ gem "stackprof" gem "rake" gem "rbs", require: false gem "steep", require: false +gem "simplecov", require: false \ No newline at end of file diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 8cecdead..b895709b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,21 @@ +require "simplecov" + +SimpleCov.start do + track_files "lib/**/*.rb" + + # Created Groups based on the folder structures + add_group "Grammar", "lib/lrama/grammar" + add_group "Lexer", "lib/lrama/lexer" + add_group "Parser", "lib/lrama/parser" + add_group "Report", "lib/lrama/report" + add_group "State", "lib/lrama/state/" + add_group "States", "lib/lrama/states/" + + add_filter "spec/" + + enable_coverage :branch +end + require "lrama" RSpec.configure do |config|