>
> Thanks, John. Sorry for the inconvenience. I was on my phone before.
>
> Here's the class....
class A
  belongs_to :b

  validate :validate_my_field

  def validate_my_field
    binding.pry # this works
    if b.to_s
      super
    end
  end
end



And here's the spec
describe A do
  subject { create(:a) }

  describe "my check" do
    it "does something" do
      expect(subject.b).to receive(:to_s)
      subject.save
    end
  end
end

Can you see any issue?

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/a3ff90c9-11d6-4e37-b735-469af8d5eed4%40googlegroups.com.

Reply via email to