I have a blueprint:
Model.blueprint(:something) do
name "Some name"
context "some context"
end
"context" is an attribute of Model, but it is also a reserved word of RSpec. When I try to make and object I get ArgumentError on "context" line.
Any ideas how to overcome this situation?
Unable to replicate this with Machinist 2.0.0.beta2.
Machinist works by overriding
method_missing?
and then assigning attributes based on those arguments. If rspec is somehow assigning acontext
method to Machinist's Lathe's objects, then that method will be called beforemethod_missing?
. If you're still experiencing this problem, you could try usingremove_method :context
before evaluating attributes:I can't tell if that would work, as I can't replicate it locally, but I would give it a shot.