[rspec-users] How do BOTH these examples pass?
Pat Maddox
pergesu at gmail.com
Wed Oct 1 10:23:02 EDT 2008
Ashley Moran <ashley.moran at patchspace.co.uk> writes:
> *does* pass the specs, both the one that says parse should be called,
> and the one that say it shouldn't! But why? I'm prepared to admit
> I'm just missing something really really really obvious (it happens
> often), but how can:
>
> it "should attempt to parse the RSS" do
> ::RSS::Parser.should_receive(:parse)
> @rss_reader.rss
> end
>
> it "should not attempt to parse the RSS" do
> ::RSS::Parser.should_not_receive(:parse)
> @rss_reader.rss
> end
>
> both pass, under any circumstances?
I think this may be a bug that I introduced recently. Fortunately I
also think someone already wrote a patch :) Check out
http://rspec.lighthouseapp.com/projects/5645/tickets/548 and see if it
solves your problem.
Pat
More information about the rspec-users
mailing list