RSpec sundry questions

Hi,

Q1 - Can I assume that the core testing framework (e.g. rails unit
testing versus RSpec) is a kind of separate issue to whether you using
mocking or not? i.e. you could use Mocha with either the rails unit
test framework or Rspec? Or is there something in Rspec that
integrates moreso with mocking?

Q2 - Anyone know where the “build” method that Ryan used in his Rails
cast? Was this a mocha method? (I couldn’t see it in the api).
Reference: http://railscasts.com/episodes/81-fixtures-in-rails-2-0

Q3 - Lastly…I want to jump into RSpec or Rails unit
testing…I’m thinking RSpec…has RSpec got more people using it
than other testing frameworks now? i.e. for Rails developers?

Thanks

On Tue, Sep 2, 2008 at 11:05 PM, Greg H.
[email protected] wrote:

Hi,

Q1 - Can I assume that the core testing framework (e.g. rails unit
testing versus RSpec) is a kind of separate issue to whether you using
mocking or not? i.e. you could use Mocha with either the rails unit
test framework or Rspec? Or is there something in Rspec that
integrates moreso with mocking?

I’m not sure I understand the question. Mocha can be used with Rails,
RSpec, Test::Unit, plain Ruby libraries… The same is true about
RSpec’s built-in mocking library.

The only mocking-specific thing about RSpec is that it ships with
mocking built-in. But if you’re happier with Test::Unit style tests,
TU+mocha will technically do the same (more or less).

Q2 - Anyone know where the “build” method that Ryan used in his Rails
cast? Was this a mocha method? (I couldn’t see it in the api).
Reference: http://railscasts.com/episodes/81-fixtures-in-rails-2-0

Where is the “build” method in this screencast? (I didn’t check the
sound).

Q3 - Lastly…I want to jump into RSpec or Rails unit
testing…I’m thinking RSpec…has RSpec got more people using it
than other testing frameworks now? i.e. for Rails developers?

The only survey I know about is this:

Aslak

On Wed, Sep 3, 2008 at 7:05 AM, Greg H.
[email protected] wrote:

Q2 - Anyone know where the “build” method that Ryan used in his Rails
cast? Was this a mocha method? (I couldn’t see it in the api).
Reference: http://railscasts.com/episodes/81-fixtures-in-rails-2-0

No, I skimmed through the screen cast, not sure what you are referring
to here, but you can check out this:

http://lindsaar.net/2008/5/12/tip-16-valid-models-don-t-have-to-be-hard

Might help

Q3 - Lastly…I want to jump into RSpec or Rails unit
testing…I’m thinking RSpec…has RSpec got more people using it
than other testing frameworks now? i.e. for Rails developers?

I don’t know that anyone has surveyed it, but if you ask on this
mailing list, I am sure we will all agree that the higher quality boyz
and galz are using RSpec :wink:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs