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
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
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
>
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,
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
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|
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
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
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
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
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
>>...
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
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
13 matches
Mail list logo