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