[rspec-users] How should I interpret RCov, code coverage?

2011-08-25 Thread Andrei Ursan
First of all I'm new to RCov. I'm having a rails application with around 20 models and 20 controllers + helpers and others. And I've got an unusual good RCov test coverage, 39%(total) and 31%(code coverage) - and this with only 12 RSpec examples. I'm running RCov with the following options: t

[rspec-users] doesn't rspec check the existence of template file

2011-08-25 Thread foreverman
Hey, I am using rspec (1.3.0) and rspec-rails (1.3.2) for my current rails2 project, I found that in my controller test, rspec doesn't check the existence of view template. For example, it "should render show template" do get :show response.should render_template :show end The above controlle

Re: [rspec-users] How should I interpret RCov, code coverage?

2011-08-25 Thread Sidu Ponnappa
> Is an RCov code coverage of 100% really good? Because in my opinion a > method should be tested for more than one case but rcov doesn't care > about this :(. RCov is C0 coverage[1]. It's trivial to hit >95% coverage; in fact you can very quickly achieve >60% coverage by writing a handful of Cuke

Re: [rspec-users] doesn't rspec check the existence of template file

2011-08-25 Thread David Chelimsky
On Aug 23, 2011, at 5:02 AM, foreverman wrote: > Hey, > > I am using rspec (1.3.0) and rspec-rails (1.3.2) for my current rails2 > project, I found that in my controller test, rspec doesn't check the > existence of view template. For example, > it "should render show template" do > get :show >

Re: [rspec-users] Tests that require a logged in user / session cookie

2011-08-25 Thread Matthias Siegel
On 25/08/2011, at 11:10 AM, Justin Ko wrote: > > > On Wed, Aug 24, 2011 at 6:40 PM, Matthias Siegel > wrote: > Hi, > > I'm fairly new to RSpec with Rails and I'm trying to work out how I can write > request specs for resources that require a logged in user. > > I can't get this one to pass

Re: [rspec-users] doesn't rspec check the existence of template file

2011-08-25 Thread Phillip Koebbe
On 2011-08-25 7:04 AM, David Chelimsky wrote: On Aug 23, 2011, at 5:02 AM, foreverman wrote: Hey, I am using rspec (1.3.0) and rspec-rails (1.3.2) for my current rails2 project, I found that in my controller test, rspec doesn't check the existence of view template. For example, it "should re

Re: [rspec-users] Tests that require a logged in user / session cookie

2011-08-25 Thread Justin Ko
On Thu, Aug 25, 2011 at 7:38 AM, Matthias Siegel wrote: > > On 25/08/2011, at 11:10 AM, Justin Ko wrote: > > > > On Wed, Aug 24, 2011 at 6:40 PM, Matthias Siegel > wrote: > >> Hi, >> >> I'm fairly new to RSpec with Rails and I'm trying to work out how I can >> write request specs for resources th

Re: [rspec-users] How should I interpret RCov, code coverage?

2011-08-25 Thread Andrew Premdas
On 25 August 2011 09:14, Andrei Ursan wrote: > First of all I'm new to RCov. > > I'm having a rails application with around 20 models and 20 controllers > + helpers and others. > > And I've got an unusual good RCov test coverage, 39%(total) and 31%(code > coverage) - and this with only 12 RSpec e

Re: [rspec-users] Tests that require a logged in user / session cookie

2011-08-25 Thread Andrew Premdas
On 25 August 2011 14:38, Matthias Siegel wrote: > > On 25/08/2011, at 11:10 AM, Justin Ko wrote: > > > > On Wed, Aug 24, 2011 at 6:40 PM, Matthias Siegel > wrote: > >> Hi, >> >> I'm fairly new to RSpec with Rails and I'm trying to work out how I can >> write request specs for resources that requ

[rspec-users] rspec macro style

2011-08-25 Thread Lenny Marks
One of the things that always annoys me when I write/use typical macros in my specs is how the backtrace from failures don't include the caller of the macro. Not a huge deal because the example name can be used to track it down, but I lose the ability to do things like click on the line from the

Re: [rspec-users] rspec macro style

2011-08-25 Thread David Chelimsky
On Aug 25, 2011, at 11:40 AM, Lenny Marks wrote: > One of the things that always annoys me when I write/use typical macros in my > specs is how the backtrace from failures don't include the caller of the > macro. Not a huge deal because the example name can be used to track it down, > but I lo