Skip to content

Spy verifies receipt of an attr assignment call #54

Description

@josephholsten
describe 'Spy' do
  subject { stub!.subject }
  describe "with an attr_writer" do
    before { stub(subject).attribute=(anything) }
    context "after setting the attr" do
      before { subject.attribute = :value }
      it("verifies receipt of the call") { should have_received.attribute=(:value) }
      it("verifies receipt of the call via method_missing hack") { should have_received.method_missing(:attribute=, :value) }
    end
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions