Re: [rspec-users] Application-wide spec_helper method

2008-09-01 Thread Nick Hoffman
On 2008-08-30, at 12:35, Mark Wilden wrote: On Sat, Aug 30, 2008 at 8:33 AM, Zach Dennis [EMAIL PROTECTED] wrote: On Fri, Aug 29, 2008 at 11:05 PM, Scott Taylor This isn't ruby - if you want ruby to include it, you'll need a require statement (or a load, or autoload). I think Scott means

Re: [rspec-users] Application-wide spec_helper method

2008-08-30 Thread Mark Wilden
On Sat, Aug 30, 2008 at 8:33 AM, Zach Dennis [EMAIL PROTECTED] wrote: On Fri, Aug 29, 2008 at 11:05 PM, Scott Taylor This isn't ruby - if you want ruby to include it, you'll need a require statement (or a load, or autoload). I think Scott means to say this isn't rspec, you need to tell

Re: [rspec-users] Application-wide spec_helper method

2008-08-29 Thread Nick Hoffman
On 2008-08-28, at 13:27, Zach Dennis wrote: You can put it in a module and include it for model specs in spec_helper.rb Spec::Runner.configure do |config| # ... config.include DescribeModelAttributeSpecHelper, :type = :model end Zach Hi Zach. I put the methods into the module

Re: [rspec-users] Application-wide spec_helper method

2008-08-28 Thread David Chelimsky
On Wed, Aug 27, 2008 at 2:38 PM, Nick Hoffman [EMAIL PROTECTED] wrote: If a helper method can be used for multiple model specs, obviously it should not be placed within a specific model's spec helper file. Is there a recommended file in which to put such a method? Maybe

Re: [rspec-users] Application-wide spec_helper method

2008-08-28 Thread Nick Hoffman
On 2008-08-28, at 08:02, David Chelimsky wrote: On Wed, Aug 27, 2008 at 2:38 PM, Nick Hoffman [EMAIL PROTECTED] wrote: If a helper method can be used for multiple model specs, obviously it should not be placed within a specific model's spec helper file. Is there a recommended file in which

Re: [rspec-users] Application-wide spec_helper method

2008-08-28 Thread Zach Dennis
You can put it in a module and include it for model specs in spec_helper.rb Spec::Runner.configure do |config| # ... config.include DescribeModelAttributeSpecHelper, :type = :model end Zach On Thu, Aug 28, 2008 at 12:41 PM, Nick Hoffman [EMAIL PROTECTED] wrote: On 2008-08-28, at 08:02,

Re: [rspec-users] Application-wide spec_helper method

2008-08-28 Thread David Chelimsky
On Thu, Aug 28, 2008 at 12:27 PM, Zach Dennis [EMAIL PROTECTED] wrote: You can put it in a module and include it for model specs in spec_helper.rb Spec::Runner.configure do |config| # ... config.include DescribeModelAttributeSpecHelper, :type = :model end What he said. Zach On Thu,

Re: [rspec-users] Application-wide spec_helper method

2008-08-28 Thread Nick Hoffman
On 2008-08-28, at 13:57, David Chelimsky wrote: On Thu, Aug 28, 2008 at 12:27 PM, Zach Dennis [EMAIL PROTECTED] wrote: You can put it in a module and include it for model specs in spec_helper.rb Spec::Runner.configure do |config| # ... config.include DescribeModelAttributeSpecHelper, :type

[rspec-users] Application-wide spec_helper method

2008-08-27 Thread Nick Hoffman
If a helper method can be used for multiple model specs, obviously it should not be placed within a specific model's spec helper file. Is there a recommended file in which to put such a method? Maybe spec/ helpers/application_helper_spec.rb ? -Nick