Re: [rspec-users] Functional Tests with custom routes

2011-03-18 Thread Brian Ledsworth
...not the place to do this, and I should do it in Cucumber or something? Yes! Tthe concept of testing controllers, views and models separately, is related to isolation of concerns. Your controller test is just that, testing the controller, regardless of routing, views, models, etc. You're u

Re: [rspec-users] Controller Spec & DataMapper Chaining

2011-03-18 Thread Brian Ledsworth
Would you post the results of your spec? I'd like to see what you're getting. I'm not familiar with DataMapper, but from an Active Record standpoint, the order clause does not look right. e.g. should be Square.all.order(:name) Try running the spec without the order clause in index (e.g. Widget.

Re: [rspec-users] Issues implementing Rspec with Rails3 from tutorial

2011-03-15 Thread Brian Ledsworth
Mohnish Hard to tell without looking at the state if your rails app or the specs. But, it looks like it might be your Model. Try loading the rails console in test ("rails console test"), and see if you can create and save the model. Also, I assume "rake db:migrate" ran without issue as well

[rspec-users] Rails 3.0.1 and rspec-rails assign issue: render doesn't have instance var

2011-03-04 Thread Brian Ledsworth
If you find the exception "undefined method 'model_name' for NilClass:Class" in view specs with Rails 3.0.1 and rspec-rails2, I believe it's a Rails issue. I receive the exception after calling render in my view spec, which indicates the @player instance var does not exist in the view. To trouble