Rails testing question

I use cucumber frequently. There are a lot of different frameworks to do testing. Is there really a reason to use anything other than cucumber as it does do db level testing with factories and stuff?

you mean some additional gems like (Shulda etc.) or testing frameworks like Steak?

You're going to want to use something for unit testing as well. Acceptance tests are great, but there is also a place for low level unit tests which run fast and test specific calculations/operations. If you're using cucumber for acceptance/integration tests, consider rspec for your unit tests. It's BDD for unit testing . . .

Best Wishes, Peter

Is rspec ok or is shoulda better?

RSpec is ok, and it's even better with shoulda :slight_smile: Shoulda is just addition to RSpec and TestUnit, it provides some additional matchers, helpers and assertions.

Bit of a hijack on this thread but I've got an app in production with currently no test coverage (yes, I know). I've dabbled with the rails in built tests in the past and totally understand why one should have test coverage, even if I don't do BDD.

Anyway, I'm hearing that cucumber is what what all the cool kids are doing these days - that right? Is it a good place to start, if so any really good noob walkthrough for writing a cuc test - my app uses authlogic. In the past I've had problems with brittle fixtures (apparently I should use factories whatever they are), also had the occasional problem simulating user logins in my tests.

The whole testing area is quite confusing as there are so many terms / frameworks to consider it seems.

bingo bob wrote in post #960303:

Bit of a hijack on this thread but I've got an app in production with currently no test coverage (yes, I know). I've dabbled with the rails in built tests in the past and totally understand why one should have test coverage, even if I don't do BDD.

Why not? You asked us, months ago, what you should do before putting your app in production. Everyone said "write tests". Apparently you ignored us all.

Anyway, I'm hearing that cucumber is what what all the cool kids are doing these days - that right? Is it a good place to start, if so any really good noob walkthrough for writing a cuc test - my app uses authlogic.

Yes. And you'd have found it quickly I'd you'd bothered to look.

In the past I've had problems with brittle fixtures (apparently I should use factories whatever they are),

"Whatever they are"? Again, phrases like that make it clear that youbhavent bothered to look.

also had the occasional problem simulating user logins in my tests.

And the problems are...?

I wouldn't normally answer with this little information, but in your case, it's clear that you've been given a lot of answers in previous discussions, but haven't bothered to pay attention to them or do your own research. That's not fair to you or us. So...read the previous threads, experiment, and then feel free to ask any further questions that pop up.

Best,