Re: [rspec-users] Controller Spec & DataMapper Chaining

2011-03-20 Thread Sid Wood
Thats great advice and now that you've pointed it out it seems so obvious. Thanks Matt. See you at Cukeup! Sid On 19 March 2011 22:11, Matt Wynne wrote: > > On 19 Mar 2011, at 17:49, Sid Wood wrote: > > Thanks Ken, but when I said I was new to RSpec I didn't mean I was THAT > new! ;o) > > I thi

Re: [rspec-users] [rspec-rails] warning about polymorphism on child objects

2011-03-20 Thread Lille
...I couldn't handle this lingering difficulty, so I just put the CommentController into a module and mixed it in. Thus, no longer soliciting comments on previous problem. Yet, I think the warning still maybe useful re Rails and comments modeling. Lille On Mar 19, 10:12 am, Lille wrote: > Hi, >

Re: [rspec-users] How do I use expect{}.to change().from().to() on Array?

2011-03-20 Thread niku -E:)
I understand that "expect{}.to change()" can't test "destructive method". So, I should write test like that. correct? require 'rspec' class Ary attr_reader :ary def initialize @count = 0 @ary = [] increment end def increment @ary << @count @count += 1 end end descri

Re: [rspec-users] How do I use expect{}.to change().from().to() on Array?

2011-03-20 Thread niku -E:)
Sorry. Test comment is incorrect. This is intentional test. require 'rspec' class Ary attr_reader :ary def initialize @count = 0 @ary = [] increment end def increment @ary << @count @count += 1 end end describe Ary, "#ary" do subject{ Ary.new } it "should increm