On Sat, Jun 6, 2009 at 1:01 AM, Lee<lee.longm...@googlemail.com> wrote: > > When I execute this, it complains of a missing method "sub_menu". This > method, along with others such as "main_menu", are called within the > layout. Unlike "main_menu" which is defined in my > "application_helper.rb" file, "sub_menu" is defined in the helper file > for the controller "contexts". How do I get the spec to "see" this > file and its contents when executed? I think It's seeing "main_menu".
Just require it and then include it. A "describe" block is really just a prettified form of class definition, so you can include any modules you like in it. Although (warning: continued smartassery here) I'm also wondering why it's a good idea to call a method defined in a specific controller's helper from a global layout. Is this layout only used by that controller? If not, why isn't the method in application helpers? -- Have Fun, Steve Eley (sfe...@gmail.com) ESCAPE POD - The Science Fiction Podcast Magazine http://www.escapepod.org _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users