Re: [rspec-users] can't access helper methods for model testing

2007-12-13 Thread Chris Olsen
>> What am I missing? Are these helpers only for controller tests? > > Rails helpers are there for views and controllers, not for models. > > If you want an RSpec helper, something you use to set up state for > your examples, you can write a module and include it in the example > groups - but t

Re: [rspec-users] can't access helper methods for model testing

2007-12-11 Thread David Chelimsky
On Dec 11, 2007 11:28 AM, Chris Olsen <[EMAIL PROTECTED]> wrote: > I would like to have some valid mock models readily available in the > helper module, but when I try to access the helper I get the error > saying that the method is not found. > === > describe MembersHelper do # Helper methods

[rspec-users] can't access helper methods for model testing

2007-12-11 Thread Chris Olsen
I would like to have some valid mock models readily available in the helper module, but when I try to access the helper I get the error saying that the method is not found. === describe MembersHelper do # Helper methods can be called directly in the examples (it blocks) def valid_member_mock

Re: [rspec-users] can't access helper methods for model testing

2007-12-11 Thread Chris Olsen
This isn't the best example, as I normally wouldn't validate a mock model, it was more for demonstration, although a bad one. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/l