Re: [rspec-users] Test Rendering nothing in Rails

2007-08-02 Thread Edward Ocampo-Gooding
Hi Shane, (I'll continue with the top-posting, but I think it should be discouraged.) As David just mentioned to me in the response to a related question, you might want to check out @controller.expects_render which is now available in rspec trunk. While the response.body.should be_empty k

[rspec-users] Best practice integration testing

2007-08-02 Thread Hussein Morsy
Hello, Are there are any best pracitces for integration-testing is rspec? What about tutorials ? I found only http://wincent.com/knowledge-base/ Using_Watir_with_RSpec_and_Rails Chears Hussein ___ rspec-users mailing list rspec-users@rubyforge.or

Re: [rspec-users] :render expects possible?

2007-08-02 Thread Edward Ocampo-Gooding
Could we have at least a warning that mentions that parameters passed to :render expectations are going to be thrown away and mention an alternative way of spec-ing this behaviour? >>> In trunk, when you call should_receive(:render) you will get an error >>> saying you should use the

[rspec-users] got/expects causes mental layering violation

2007-08-02 Thread Jay Levitt
I was, for the first time, spec'ing a class that redefined ==. And my spec was incorrect, so == was returning false. The result was something like: class C def ==(other) false end end .. C.new.should == other... expected other, got # (using ==) But wait! Why on earth is == return

Re: [rspec-users] Best practice integration testing

2007-08-02 Thread David Chelimsky
On 8/2/07, Hussein Morsy <[EMAIL PROTECTED]> wrote: > Hello, > > Are there are any best pracitces for integration-testing is rspec? > What about tutorials ? > > I found only http://wincent.com/knowledge-base/ > Using_Watir_with_RSpec_and_Rails We're working on getting the rbehave story runner merg

Re: [rspec-users] Best practice integration testing

2007-08-02 Thread Hussein Morsy
> > We're working on getting the rbehave story runner merged into rspec > and able to integrate w/ rails, but that's probably a couple of months > away from reality. > nice to hear :-) > Right now I just use rails integration testing and spec/ui to drive > in-browser tests with Selenium or Wat

Re: [rspec-users] Best practice integration testing

2007-08-02 Thread David Chelimsky
On 8/2/07, Hussein Morsy <[EMAIL PROTECTED]> wrote: > > > > We're working on getting the rbehave story runner merged into rspec > > and able to integrate w/ rails, but that's probably a couple of months > > away from reality. > > > > nice to hear :-) > > > > > > Right now I just use rails integrati

Re: [rspec-users] got/expects causes mental layering violation

2007-08-02 Thread David Chelimsky
On 8/2/07, Jay Levitt <[EMAIL PROTECTED]> wrote: > I was, for the first time, spec'ing a class that redefined ==. And my > spec was incorrect, so == was returning false. > > The result was something like: > > class C >def ==(other) > false >end > end > > .. C.new.should == other... >

Re: [rspec-users] Best practice integration testing

2007-08-02 Thread Hussein
> > We're working on getting the rbehave story runner merged into rspec > and able to integrate w/ rails, but that's probably a couple of months > away from reality. nice to hear :-) > Right now I just use rails integration testing and spec/ui to drive > in-browser tests with Selenium or Watir.

Re: [rspec-users] got/expects causes mental layering violation

2007-08-02 Thread Jay Levitt
David Chelimsky wrote: > On 8/2/07, Jay Levitt <[EMAIL PROTECTED]> wrote: >> I was, for the first time, spec'ing a class that redefined ==. And my >> spec was incorrect, so == was returning false. >> >> The result was something like: >> >> class C >>def ==(other) >> false >>end >> end

[rspec-users] Do the :attributes and :content matchers work

2007-08-02 Thread sinclair bain
[Rails plugin 1.0.5] Hi, I am looking for some guidance. When working on a partial which looks like this I have some examples which should fail - I think - but do not: it ' should fail' do response.should have_tag( 'div.bug', :content => 'There is no content!' ) end

Re: [rspec-users] Do the :attributes and :content matchers work

2007-08-02 Thread David Chelimsky
On 8/2/07, sinclair bain <[EMAIL PROTECTED]> wrote: > [Rails plugin 1.0.5] > > > Hi, > I am looking for some guidance. > When working on a partial which looks like this > > > > I have some examples which should fail - I think - but do not: > > it ' should fail' do >response.s

Re: [rspec-users] Do the :attributes and :content matchers work

2007-08-02 Thread David Chelimsky
On 8/2/07, sinclair bain <[EMAIL PROTECTED]> wrote: > [Rails plugin 1.0.5] > > > Hi, > I am looking for some guidance. > When working on a partial which looks like this > > > > I have some examples which should fail - I think - but do not: > > it ' should fail' do >response.s