On Sun, Sep 28, 2008 at 9:47 AM, Ashley Moran
<[EMAIL PROTECTED]> wrote:
> Hi
>
> Just had a surprising result:
>
> it "should not appear in the Story.unposted list" do
> @story.save
> lambda {
> @story.post_to_twitter(@twitter_client)
> }.should change { Story.unposted }.from([EMAIL PROTECTED]).to([])
> end
>
> 'Story#post_to_twitter should not appear in the Story.unposted list' FAILED
> result should have been changed to [], but is now []
>
> Anyone know why this fails? I've looked in change.rb but I can't figure it
> out.
Whenever I've seen output like "should have been foo, but was foo" it
has boiled down to AR Assocation Proxies, which don't align in their
response to == and inspect.
I'm looking at seeing if there's a way we can make "should change"
work in spite.
> I can make it work with:
> should change { Story.unposted.length }.from(1).to(0)
>
> But that's a weaker test.
>
> Thanks
> Ashley
>
> --
> http://www.patchspace.co.uk/
> http://aviewfromafar.net/
>
> _______________________________________________
> rspec-users mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users