Pablo L. de Miranda
2011-Jul-25 14:16 UTC
[rspec-users] 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 < pablolmiranda at gmail.com> wrote:> 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 > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > 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? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110725/75ec22e1/attachment.html>
Pablo L. de Miranda
2011-Jul-25 15:03 UTC
[rspec-users] Adding a folder to my rspec execution path
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 < pablolmiranda at gmail.com> wrote:> 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 > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > 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? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110725/033f90e5/attachment.html>
Pablo L. de Miranda
2011-Jul-25 15:59 UTC
[rspec-users] Adding a folder to my rspec execution path
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
David Chelimsky
2011-Jul-25 16:32 UTC
[rspec-users] Adding a folder to my rspec execution path
On Jul 25, 2011, at 10:59 AM, Pablo L. de Miranda wrote:> 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.rbThese ^^ 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> | |-- 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 > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
On Mon, Jul 25, 2011 at 9:59 AM, Pablo L. de Miranda < pablolmiranda at gmail.com> wrote:> 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 > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110725/41ede139/attachment-0001.html>