I am trying to spec out a method that is using the 'beam' gem to fire
an event. When the method fires the event, it should pass the current
+self+ as an argument.
e.g.
def foo
Beam.fire :my_event, self
end
it "should fire :my_event and pass self" do
Beam.should_receive(:fire).with(:my_event, ????)
foo
end
How can I set a mock expectation to work resolve self correctly? I
suspect it isn't possible but I'd like confirmation before I waste too
much time on this.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users