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 a context
method to Machinist's Lathe's objects, then that method will be called before method_missing?
. If you're still experiencing this problem, you could try using remove_method :context
before evaluating attributes:
Model.blueprint(:something) do
remove_method :context
name "Some name"
context "some context"
alias_method :context, :describe
end
I can't tell if that would work, as I can't replicate it locally, but I would give it a shot.