1
0
Fork 0
Commit graph

54 commits

Author SHA1 Message Date
Markus Schirp
3ebf5b7992 Prepare to split mutant-rspec from gem.
* Moves all rspec integration into Mutant::Rspec namespace.
* Removes the unused --rspec-level option
* Mutant::Rspec::Strategy is smelly, has no state. Will make sense with
  future commits.
2014-01-17 22:59:22 +01:00
Piotr Solnica
5ccf128fa2 Revert "Automatically expand scope of example groups"
This reverts commit e1edf672dc.
2013-09-14 20:23:14 +02:00
Piotr Solnica
868dd0846c Special treatment for Noop mutations
Otherwise mutant would run all matched example groups for a noop when it
only makes sense to run the first match
2013-09-14 20:22:35 +02:00
Markus Schirp
f18aa6cd0b Code style 2013-09-02 00:22:25 +02:00
Piotr Solnica
e1edf672dc Automatically expand scope of example groups
Given a subject Foo::Bar#baz mutant will run example groups with
description starting with:

  - Foo::Bar#baz
  - Foo::Bar
  - Foo

This basically means you can kill a mutation via a dedicated spec for a
given method, all specs for a given object or all the specs within the
object's namespace.

In most of the cases you should target killing mutations via a dedicated
spec for a particular method *however* there are valid cases where
implicit coverage is absolutely fine.
2013-08-05 18:21:12 +00:00
Markus Schirp
1aafcdc71e Use RSpec buildin noop Reporter 2013-08-05 07:46:52 +02:00
Markus Schirp
fe1250717a Remove debuggin 2013-08-04 23:21:53 +02:00
Markus Schirp
eb3286e952 Add debug comment 2013-08-04 23:05:46 +02:00
Markus Schirp
75260e509f Add noop reporter for rspec killer
This speads up rspec killer significantly!
2013-08-04 22:18:36 +02:00
Markus Schirp
53cd2bd00a Remove unused constant 2013-08-04 19:31:38 +02:00
Markus Schirp
f70dc6703f Initial rspec killer with "longes description prefix match" 2013-08-04 18:49:42 +02:00
Dan Kubb
7293386c26 Add magic encoding header to all ruby files
* rubocop still warns about this on ruby 1.9.3, so it was fixed so
  it produces less output on travis.
2013-07-28 16:03:06 -07:00
Markus Schirp
e7debcb801 Fix style issues in Killer::Rspec 2013-07-29 00:25:15 +02:00
Jesse Kempf
c923e1b5ed Surface the output of rspec failures when killing noop mutants. 2013-07-25 21:13:29 -07:00
Dan Kubb
59f952d56f Remove rescue from rspec killer
* Based on recent discussions in  we think rescuing all
  exceptions like this was probably a mistake.

  If this continues to be a problem we will need to narrow things
  down to a reproducible issue we can report to the RSpec team.

  One possible work-around might be to catch exceptions that occur
  within the specs themselves, and to bubble up everything else.
  However, this does bring up the question of why the specs failed;
  if it was due to a syntax error caused by mutant and unparser,
  then that's probably a bug we need to fix. It could be for some
  other reason, which we would have to isolate and handle
  explicitly, but I think we are all in agreement that this logic is
  too broad.
2013-07-21 23:14:57 -07:00
Markus Schirp
13719eb0d3 Singnal killer status NOT success status
success depends on mutation type!
2013-07-05 00:20:45 +02:00
Dan Kubb
6cb9c76953 Change Mutant::Killer::Rspec#run to rescue errors from RSpec 2013-06-24 01:38:37 -07:00
Dan Kubb
6a96062153 Fix Mutant::Killer::Forked#run to return true only on a successful exit 2013-06-23 17:29:06 -07:00
Dan Kubb
3f83290538 Fix problem with SIGILL thrown by a different child was being caught
* For some reason other children were throwing SIGILL signals which
  were being caught by Process.wait2. This fixes the problem by only
  waiting for the forked child to finish.
2013-06-23 16:45:54 -07:00
Markus Schirp
47159696e8 Do not rescue arbitrary killer exceptions 2013-06-23 22:22:35 +02:00
Markus Schirp
ddff94c174 Fix style issue
Closes 
2013-06-21 16:21:29 +02:00
Markus Schirp
1f25ab3ded Cosmetic end comments 2013-06-14 21:12:10 +02:00
Dan Kubb
10b1e106ff Add require stringio temporarily to rspec killer 2013-04-17 20:38:42 -07:00
Dan Kubb
bf06f6b056 Fix code to no longer reference non-existent methods
* This code is not final, but I could not figure out a clean way to
  reference the error and output stream from this method.
2013-04-17 20:34:24 -07:00
Dan Kubb
10321549cd Fix code to use proper method 2013-04-17 20:34:24 -07:00
Dan Kubb
c3c0e06c86 Fix whitespace 2013-04-17 20:31:21 -07:00
Markus Schirp
277a29aba5 Cleanup killers 2013-02-01 23:39:00 +01:00
Markus Schirp
5b3d506523 Reconnect API changes for successful spec run
Sorry this looks like spiking around and yeah it was some kind of.
2013-01-22 00:00:30 +01:00
Markus Schirp
d41d7eddb0 Refactor reporter infrastructure 2013-01-15 23:46:05 +01:00
Markus Schirp
c9d762dbe9 Add better rspec dm2 spec lookup 2013-01-13 23:48:18 +01:00
Markus Schirp
356820c4af Do not explicitly capture StandardError 2013-01-09 23:03:01 +01:00
Markus Schirp
66b09f8d8a Do not rescue all exceptions from mutation insertion 2013-01-08 09:34:24 +01:00
Markus Schirp
c0fa278f19 Count exception between mutation insertion and spec run as kill 2013-01-05 22:59:32 +01:00
Markus Schirp
93556763dd Bring back yard coverage to 100%
Also do some minor refactorings
2012-12-12 22:31:27 +01:00
Markus Schirp
40d5230c68 Introduce noop mutation guards and argument mutators
* Sorry for not splitting up into smaller commit
2012-12-11 00:17:19 +01:00
Markus Schirp
3fc07deaff Make sure mutation is inserted after fork 2012-12-07 18:53:03 +01:00
Markus Schirp
7be00708b6 Improve rspec dm2 strategy
* Expand foo? to foo_predicate_spec.rb
* Expand foo! to foo_bang_spec.rb
* Execute all public method specs on mutation of private method
* Warn on stderr when no spec file was found (better than nothing to be
  iproved later)
2012-12-07 16:57:42 +01:00
Markus Schirp
939e25cb4a Correctly propagnate exit status of forking killers 2012-12-05 16:44:26 +01:00
Markus Schirp
9533a92bb7 Default to forking killer
* Remove rspec world preserving will never work correctly
* Add new unmutated nodes to noop mutators
2012-12-04 19:38:58 +01:00
Markus Schirp
8c3cc4a18c Add rspec world preserve hack 2012-12-04 18:23:56 +01:00
Markus Schirp
70060caf5d Cleanup rspec runner and extract unused code 2012-11-24 17:06:33 +01:00
Markus Schirp
fb8bb2ed24 Add static fail and success strategies
* Useful for benchmarking
2012-11-22 03:00:36 +01:00
Markus Schirp
a5f387eafd Do not nest rspec killer 2012-11-22 02:50:17 +01:00
Markus Schirp
86acb3a409 Cleanup killers and add executable to gemspec 2012-11-22 01:42:10 +01:00
Markus Schirp
dffe2a26e6 Add strategy objects 2012-11-22 00:10:50 +01:00
Markus Schirp
02a909efda Generalize forking and non forking killers 2012-11-21 22:55:53 +01:00
Markus Schirp
dc083547f5 Connect cli with runner.
Only supports the testing of testapp... but time will come!
2012-11-21 22:28:08 +01:00
Markus Schirp
ccbe2f6396 Mark failing specs as panding and use attr_reader again 2012-10-26 11:24:29 +02:00
Markus Schirp
9fcb271637 General source code beautifications 2012-10-19 23:34:19 +02:00
Markus Schirp
3738254317 Cleanup whitespace 2012-08-28 19:43:53 +02:00