andrewculver/koudoku — pull request #81 by georgemillo (2014-11-12 05:36:27+00:00)
Title: Cleaning up specs

Removed some redundant spec files in the dummy app (they were producing 'pending' messages when running the test suite.)

Removed a duplicate line in `plan.rb`

Renamed "Plan" to "FakePlan" in one of the specs. This is because it was causing non-deterministic errors when running the test suite - if `spec/concerns/koudoku/plan_spec.rb` was run before one of the other specs which uses the `Plan` class, then `Plan` would be instantiated as a PORB (i.e. not as a subclass of `ActiveRecord::Base`) - meaning when the other specs ran, errors would occur. Renaming it fixes this naming conflict. (An alternative would also be to change the line `class Plan` in `spec/concerns/koudoku/plan_spec.rb` to `class Plan < ActiveRecord::Base` and remove `attr_accessor :price`, but that would be slower and adds an extra dependency.)