On Sun, Apr 26, 2009 at 10:20 PM, Dan North wrote:
> 2009/4/24 Stephen Eley
>>
>> Yeah, I'm a smartass.
>
> Well you seem to be on the right lines to me.
Thank you! That means a great deal to me.
--
Have Fun,
Steve Eley (sfe...@gmail.com)
ESCAPE POD - The Science Fiction Podcast Magazi
On Sun, Apr 26, 2009 at 9:20 PM, Dan North wrote:
> 2009/4/24 Stephen Eley
>>
>> On Thu, Apr 23, 2009 at 2:19 PM, Fernando Perez
>> wrote:
>>
>> [...]
>>
>> # Assume an article with no comments and a params structure
>> # have already been set up in before(:each)
>>
>> it "should make a new comm
2009/4/24 Stephen Eley
> On Thu, Apr 23, 2009 at 2:19 PM, Fernando Perez
> wrote:
>
> [...]
>
> # Assume an article with no comments and a params structure
> # have already been set up in before(:each)
>
> it "should make a new comment belonging to the article" do
> post :create, :comment => @m
On Thu, Apr 23, 2009 at 2:19 PM, Fernando Perez wrote:
> Rails definitely entices you to break Demeter's law just so often.
So fix it. It's usually just a matter of putting in some delegators.
If you don't like @article.comments.build, you can declare your own
Article.build_comment() method and
On Thu, Apr 23, 2009 at 2:19 PM, Fernando Perez wrote:
> Rails definitely entices you to break Demeter's law just so often.
>
> Now how to cleanly spec:
>
> @comment = @article.comments.build(params[:comment]) ?
You think that's bad, I've seen many a code that looks like:
project.tasks.map(&:res
Rails definitely entices you to break Demeter's law just so often.
Now how to cleanly spec:
@comment = @article.comments.build(params[:comment]) ?
Mocking and stubbing is starting to get ugly now.
--
Posted via http://www.ruby-forum.com/.
___
rspec-u
On Apr 21, 2009, at 9:45 AM, Steve Schafer wrote:
On Mon, 20 Apr 2009 12:40:08 -0700, you wrote:
I wrote a blog post that may be helpful.
http://www.patmaddox.com/blog/demeter-is-for-encapsulation
Basically,
when you have structural objects as in this case, demeter isn't
useful.
I agree
On Mon, 20 Apr 2009 12:40:08 -0700, you wrote:
>I wrote a blog post that may be helpful.
>http://www.patmaddox.com/blog/demeter-is-for-encapsulation Basically,
>when you have structural objects as in this case, demeter isn't
>useful.
That's a good example as far as it goes, but I think it makes