You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.
It would be nice if shoulda generated the test for the controller. Of course if a fallback is specified, the controller test file is generated with "test/unit" style, but then what's the point of having shoulda as the default generator ;).
Thanks.
The text was updated successfully, but these errors were encountered:
Agreed. However, I have a problem, I do not use shoulda or known the current best practices when using shoulda. If you like, you can fork/brach (branching is good) the project to add some suggested stuff. Even if it is just stubs of how you setup your controller tests.
Thanks for pointing this out and thanks for your future contributions
Also, when using shoulda with rspec, the unit and functional test files are still created in test/ (not spec). If I change that in my application.rb (with the :dir => '' option) it is changed for both unit and functional test files (e.g. putting the model- and controller test files inside the same dir). Frustrating.
I'd just like to say that I've wasted almost an hour of my life trying to work out why I was getting these [not found] messages, I convinced myself it was some kind dependency loading issue (rails3-generators is a dependency of a gem I am requiring into my main project, it is loaded into the main project 'through' the gem and I was unsure if this was working.) Don't get me wrong I'm not ungrateful just frustrated :)
If this message could be suppressed in the generator output that would be a very good move, I am sure there are others out there going round and round in circles along these same lines.
Using Rails 3.0 RC, shoulda 2.11.1 and rails3-generators 0.11.0, I've found that running:
rails g scaffold article title:string body:text
Generates the following output:
invoke active_record
create db/migrate/20100727193257_create_articles.rb
create app/models/article.rb
invoke shoulda
create test/unit/article_test.rb
invoke factory_girl
create test/factories/articles.rb
route resources :articles
invoke scaffold_controller
create app/controllers/articles_controller.rb
invoke haml
create app/views/articles
create app/views/articles/index.html.haml
create app/views/articles/edit.html.haml
create app/views/articles/show.html.haml
create app/views/articles/new.html.haml
invoke simple_form
create app/views/articles/_form.html.haml
error shoulda [not found]
invoke helper
create app/helpers/articles_helper.rb
error shoulda [not found]
It would be nice if shoulda generated the test for the controller. Of course if a fallback is specified, the controller test file is generated with "test/unit" style, but then what's the point of having shoulda as the default generator ;).
Thanks.
The text was updated successfully, but these errors were encountered: