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
...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,
>
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
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