[rspec-users] How to spec the existence of specs

2008-08-28 Thread Nick Hoffman
I'm writing a Rails plugin that generates specs for Rails models. Obviously, I want to use RSpec to spec this plugin. The plugin, called ModelSpeccer, contains a module with three methods. Each method generates specs depending on its arguments. How can my plugin's specs check that each meth

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

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 >

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 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] How much test data to use in specs

2008-08-28 Thread Nick Hoffman
On 2008-08-28, at 08:31, David Chelimsky wrote: On Wed, Aug 27, 2008 at 2:24 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote: On 2008-08-27, at 14:46, David Chelimsky wrote: If you want to (not necessarily advising this, but I've seen it done) you can do this: ['!','(',')','&'].each do |char|

Re: [rspec-users] error paths: a new scenerio or test in story runner?

2008-08-28 Thread aidy lewis
Hi David, On 28/08/2008, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Thu, Aug 28, 2008 at 8:22 AM, aidy lewis <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I think the scenario based way of defining acceptance tests is akin to > > scenarios in use-cases. > > > > In use-cases we can have a ha

Re: [rspec-users] error paths: a new scenerio or test in story runner?

2008-08-28 Thread David Chelimsky
On Thu, Aug 28, 2008 at 8:22 AM, aidy lewis <[EMAIL PROTECTED]> wrote: > Hi, > > I think the scenario based way of defining acceptance tests is akin to > scenarios in use-cases. > > In use-cases we can have a happy path with extends for error conditions etc. > > Should I create extra scenarios for

[rspec-users] error paths: a new scenerio or test in story runner?

2008-08-28 Thread aidy lewis
Hi, I think the scenario based way of defining acceptance tests is akin to scenarios in use-cases. In use-cases we can have a happy path with extends for error conditions etc. Should I create extra scenarios for my error conditions (making my tests less understandable) or should I create a new e

Re: [rspec-users] story runner not running on build machine

2008-08-28 Thread Zach Dennis
On Thu, Aug 28, 2008 at 3:39 AM, aa aa <[EMAIL PROTECTED]> wrote: > Ben Mabey wrote: >> aa aa wrote: >>> >>> what is going on here?! >>> It doesn't seem to be loading the plugin does it? >>> >> Please post a runner file, your spec helper, and a steps file. >> >> -Ben > > odd, i changed the line in

Re: [rspec-users] How much test data to use in specs

2008-08-28 Thread David Chelimsky
On Wed, Aug 27, 2008 at 2:24 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote: > On 2008-08-27, at 14:46, David Chelimsky wrote: >> >> If you want to (not necessarily advising this, but I've seen it done) you >> can do this: >> >> ['!','(',')','&'].each do |char| >> it "can't have #{char}" do >>...

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 > spec/helpers/appli

Re: [rspec-users] story runner not running on build machine

2008-08-28 Thread aa aa
Ben Mabey wrote: > aa aa wrote: >> >> what is going on here?! >> It doesn't seem to be loading the plugin does it? >> > Please post a runner file, your spec helper, and a steps file. > > -Ben odd, i changed the line in the all.rb from >Dir[File.expand_path("#{dir}/**/*.rb")].uniq.each do |file