provide matchers for rspec
-
Kevin Rutherford
- State changed from new to open
-
Kevin Rutherford
Code such as
"def x() y + z; end".should smell_of(:UncommunicativeName, /x/)would check that the report contained an instance of UncommunicativeName, and that it's warning message matched /x/.
The names are camel case because FeatureEnvy, for example, is the name of a class of smell :)
-
Kevin Rutherford
So I envisage usages such as this:
it 'should recognise different bad names' do code = "def x(z) y + z; end" code.should smell_of(:UncommunicativeName, /x/, /method/) code.should smell_of(:UncommunicativeName, /y/, /variable/) code.should smell_of(:UncommunicativeName, /z/, /parameter/) end(This will allow me to rewrite most of Reek's own examples; I don't expect general users to make much use of it.)
-
Kevin Rutherford
Peeled off the Dir part into #32 provide rspec matcher for file lists, because it requires a bit of a rethink about design of reports and such.
-
Kevin Rutherford
- State changed from open to resolved
Resolved at tag v0.3.1.3, except for Dir matchers (see #32 provide rspec matcher for file lists).
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.