Forum: RSpec Autospec only runs specs in spec/models/ folder

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Wayne S. (Guest)
on 2008-11-18 21:28
Hi,

Where do I change the mappings of the specs in my rails app.
rspec/lib/autotest/rspec.rb?

Given the latest versions in rspec, what is the bare minimum
plugins/gems that I need to run autospec. I've been playing around and
installing too much stuff into my app that I'm confused :P

THanks!
Wayne
David C. (Guest)
on 2008-11-18 21:40
(Received via mailing list)
On Tue, Nov 18, 2008 at 1:28 PM, Wayne S. <removed_email_address@domain.invalid> 
wrote:
> Hi,
>
> Where do I change the mappings of the specs in my rails app.
> rspec/lib/autotest/rspec.rb?
>
> Given the latest versions in rspec, what is the bare minimum
> plugins/gems that I need to run autospec. I've been playing around and
> installing too much stuff into my app that I'm confused :P

All you need to do this is rspec-rails, rspec, and ZenTest.

If you look at lib/autotest/rails_rspec.rb, you'll see how RailsRspec
clears and resets the mappings between spec files and their associated
application code files. Take a look at that and see if it makes sense
to you. If so, you can follow a similar path with your own mappings in
a .autotest file at the root of your project.

HTH,
David
Wayne S. (Guest)
on 2008-11-18 23:54
David C. wrote:
> On Tue, Nov 18, 2008 at 1:28 PM, Wayne S. <removed_email_address@domain.invalid> wrote:
>> Hi,
>>
>> Where do I change the mappings of the specs in my rails app.
>> rspec/lib/autotest/rspec.rb?
>>
>> Given the latest versions in rspec, what is the bare minimum
>> plugins/gems that I need to run autospec. I've been playing around and
>> installing too much stuff into my app that I'm confused :P
>
> All you need to do this is rspec-rails, rspec, and ZenTest.
>
> If you look at lib/autotest/rails_rspec.rb, you'll see how RailsRspec
> clears and resets the mappings between spec files and their associated
> application code files. Take a look at that and see if it makes sense
> to you. If so, you can follow a similar path with your own mappings in
> a .autotest file at the root of your project.
>
> HTH,
> David

Thanks. Realised that there were a few extra folders that were created
in the spec which wasn't mapped.
This topic is locked and can not be replied to.