Commit graph

17 commits

Author SHA1 Message Date
Markus Schirp
8233c5871f Reduce matcher interface
* New primary interface #call makes specs and implementations much
  easier
* We had #each mostly for historical reasons that are not relevant
  anymore
* Mutation covers the Mutant::Matcher namespace
2015-10-28 20:13:00 +00:00
Keenan Brock
ceedb61c4f Redefine class in instance matcher spec
- rspec describes are not classes, so the class was defined globally
- this caused warnings for other matchers
2015-05-13 22:57:44 -04:00
Keenan Brock
0495f59bcd Redefine class in singleton matcher spec
- rspec describes are not classes, so the class was defined globally
- this caused warnings for other matchers
2015-05-13 21:34:34 -04:00
Markus Schirp
6df5811a87 Use RSpec as receiver for rspec DSL methods
* I dislike the global infection RSpec does. This commit is a first step
  to get a rid of it.
* Also remove the need for `require 'spec_helper` in each spec file with
  adjusting `.rspec`.
2014-08-10 21:04:07 +00:00
Tim Chambers
fb813f1e80 Use RSpec3 format stubs 2014-08-06 10:46:29 -07:00
Markus Schirp
a53a4d2d67 Add a spec for matching methods without source location 2014-07-06 03:00:21 +00:00
Markus Schirp
3390abc675 Use environment object inside matchers
This will allow to use reporters from matchers avoiding stupid direct
writes to $stderr.

Also it will allow to remove matching from CLI altogether in a phase of
the runner. Allowing to decouple Mutant::Config from VM environment
allowing to serialize it ;)

Step by step. Takes a while.
2014-06-30 13:08:52 +00:00
Markus Schirp
a18a15f8ec Simplify method matcher 2014-06-30 12:53:48 +00:00
Markus Schirp
a19f3b1691 Nuke UTF-8 encoding headers
* I do not use 1.9.3
* Also keeping them in each file increases mental overhead (true it *can* be autoamted)
* None of the files encodes NON ASCII chars.
* I do not expect it makes any difference, since nobody programmatically
  will consume strings generated by mutant under the assumption they are UTF-8 encoded.
* 1.9.3 Users have to deal with the encoding fuckup under ruby anyways.
2014-06-09 15:37:48 +00:00
Markus Schirp
399f352328 Consistently use expect syntax 2014-02-02 22:49:33 +01:00
Markus Schirp
9edb375ef3 Use more modern spec layout
* This specs still have spec per method granularity
* But one file specs multiple methods
* Compatible with mutant spec selector
* Deduplicates boilerplate unit setup
2013-12-29 23:29:58 +01: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
46f90aa328 Fix all style warnings under spec/**/*.rb 2013-07-29 00:25:15 +02:00
Dan Kubb
2c6934f146 Change deprecated mock() to double()
* Fix code alignment
2013-07-14 10:01:30 -07:00
Markus Schirp
49133680ee Add AST caching for subject matcher
At least this dramatically speeds up unit tests. And this is a good
thing.
2013-06-27 22:18:07 +02:00
Markus Schirp
1ea05148f1 Add specs for singleton methods matcher
Also cleanup some dead code
2013-04-27 18:21:38 +02:00
Markus Schirp
99c0cc89bd Refactor methods matcher
closes #38
2013-04-27 15:52:49 +02:00