[rspec-users] problem to mock association proxy
Daniel Area Criações
danielvlopes at areacriacoes.com.br
Fri Dec 5 15:51:20 EST 2008
Thanks Ashley, you right.
Daniel Lopes Area Criações
Design, Websites e Sistemas Web
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
55 (31) 3077-4560 / 55 (31) 8808-8748 / 55 (31) 8737-7501
On Fri, Dec 5, 2008 at 6:41 PM, Ashley Moran
<ashley.moran at patchspace.co.uk>wrote:
> On 5 Dec 2008, at 20:26, Daniel Area Criações wrote:
> This line is only saying that @properties (assigned[:properties]) have
>> some value ... is that?
>> assigns[:properties].should == :user_properties
>> I can change above to assigns[:properties].should_not be_nill and the
>> semantic value will be the same, right?
> Ah no, the semantic value is different because this would also pass:
> def index
> @properties = "vegetable soup"
> Yet that does not implement the same behaviour.
> When you write a behaviour example, always ask the question "What could I
> realistically write that could pass this but not give the desired
> behaviour?" That way you will avoid false confidence in specs where the
> behaviour could be broken in the future (perhaps during refactoring), but
> RSpec still reports success.
> rspec-users mailing list
> rspec-users at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users