1

In a 'hexx-null' gem I have a file:

# lib/hexx/null.rb
module Hexx
  class Null
    # ...
  end
end

The RSpec specification file is:

# spec/tests/null_spec.rb
describe Hexx::Null do

  describe ".new" do
    # ...
  end

  # ... etc.
end

Then I run the mutant from gem root:

$ mutant --include lib --require hexx-null --use rspec Hexx::Null

The result is:

Mutant configuration:
Matcher:         #<Mutant::Matcher::Config match_expressions=[<Mutant::Expression: Hexx::Null>] subject_ignores=[] subject_selects=[]>
Integration:     rspec
Expect Coverage: 100.00%
Jobs:            8
Includes:        ["lib"]
Requires:        ["hexx-null"]
Subjects:        0
Mutations:       0
Kills:           0
Alive:           0
Runtime:         0.05s
Killtime:        0.00s
Overhead:        Inf%
Coverage:        0.00%
Expected:        100.00%
Active subjects: 0

It seems like mutant finds no examples, but why?

Andrew Kozin
  • 1,012
  • 9
  • 17
  • Can you add a a small debug printout to your `spec/tests/null_spec.rb` to check if that file is actually loaded when mutant runs? Mutant should instruct rspec to load all spec files. If mutant does not see the examples that might fail in your case. – mbj Jun 02 '15 at 03:22
  • Markus, thanks for your answer. Unfortunately now is more than 3 months since I solved this by myself. I'm trying to remember what I did wrong, but cannot. I'll update this post if remember. By now all I can recall is that the error was in a command running mutant. Now mutant works fine... well, almost always ;) Thank you once again - this gem I use always and anywhere. – Andrew Kozin Jun 12 '15 at 17:54
  • I should write down the requirements a test suite must fullfill when starting with mutant. This should eliminate such pain. Cool you like the tool. Please report any problem as issue in GH, best, Markus. – mbj Jun 13 '15 at 05:29

0 Answers0