sporkrb/spork — Issue #156: Specs fail under spork, pass otherwise
Author: marten
Created: 2011-11-02 08:43:02+00:00
State: open

We get strange errors like:

26) epd/meas_instances/index.html.haml when the active protocol is an automatic protocol and the patient is already subscribed should not offer to subscribe
Failure/Error: @subscription = mock_model(ProtocolSubscription, :id => 1)
ArgumentError:
The mock_model method can only accept as its first argument:
* A String representing a Class that does not exist
* A String representing a Class that extends ActiveModel::Naming
* A Class that extends ActiveModel::Naming

It received ProtocolSubscription
# ./spec/views/epd/meas_instances/index.html_spec.rb:48:in `block (4 levels) in '

Or:

10) EvaluateController#collect_answers should thank me if there are no more questionnaires to be filled in
Failure/Error: @answer = Answer.create!(:questionnaire => @questionnaire,
NoMethodError:
undefined method `create!' for Answer:Class
# ./spec/controllers/evaluate_controller_spec.rb:17:in `block (3 levels) in '

The results also differ from machine to machine (even using Bundler). I have no idea how to debug this to find out what and where it's going wrong, but I'm hoping someone here might be able to direct me somewhat.