Adding a folder to my rspec execution path

Hi guys,

I’m using RSpec with Capybara, and for that I created the
spec/integration folder. But when I execute the command “bundle exec
rspec spec” RSpec don’t execute my files on integration folder. I need
to pass each file to solve this problem.
Do you known how I can put the integration folder on rspec execution
path without need to pass each file?

Thanks,

Pablo

On Mon, Jul 25, 2011 at 8:16 AM, Pablo L. de Miranda <
[email protected]> wrote:

Pablo


rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

“requests” and “integration” directories should be in the execution
path.
What version of rspec_rails are you using?

Hi Justin,

I’m using RSpec 2.6.0, RSpec-Rails 2.6.1, Capybara 1.0.0 and Rails
3.0.7.

Att,

Pablo

On Mon, Jul 25, 2011 at 9:03 AM, Pablo L. de Miranda <
[email protected]> wrote:

http://rubyforge.org/mailman/listinfo/rspec-users

“rspec spec” should definitely be running the specs in your integration
folder. Just to be sure, is your directory structure like this?

rails_root/spec/integration

And you are running “rspec spec” from the rails root directory?

Justin,

Bellow is my directory tree for spec:

|-- spec
| |-- controllers
| | -- site_controller_spec.rb | |-- factories.rb | |-- fixtures | |– avatar.jpg
| |-- helpers
| | |-- profile_helper_spec.rb
| | |-- site_helper_spec.rb
| | -- task_list_helper_spec.rb | |-- integration | | |-- todo_list.rb | | |-- user_login.rb | |– user_profile.rb
| |-- models
| | |-- relationship_spec.rb
| | |-- todo_list_item_spec.rb
| | |-- todo_list_spec.rb
| | -- user_spec.rb | |-- spec_helper.rb |– support
| `-- integration_example_group.rb

And yes, I’m executing the rspec inside my rails root dir.
I’m believing that the rspec will execute my integration tests without
any modification on path, how I could add a dir on path executing?

Thanks,

Pablo

On Mon, Jul 25, 2011 at 9:59 AM, Pablo L. de Miranda <
[email protected]> wrote:

| |-- helpers
| | |-- todo_list_spec.rb

Pablo


rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Ah ha! Your integration specs need to have _spec.rb in the file names,
just
like models, controllers, etc.

On Jul 25, 2011, at 10:59 AM, Pablo L. de Miranda wrote:

| |-- helpers
| | |-- profile_helper_spec.rb
| | |-- site_helper_spec.rb
| | -- task_list_helper_spec.rb | |-- integration | | |-- todo_list.rb | | |-- user_login.rb | |– user_profile.rb

These ^^ need to end in _spec.rb for the default settings to pick them
up. You can configure that to work differently, but I’d recommend
sticking w/ the convention.

HTH,
David

OMG, I don’t believe that I forget that. Thank you so much Justin.

Att,

Pablo