I'm interested in using Cucumber and Capybara to test non-rails (and
non-rack based) web applications. However, I'm still not clear on how
to generate the project structure for testing an external web
application. Is there a generator somewhere that I'm overlooking or
should I be creating the project files and structure by hand?
On Tue, Oct 12, 2010 at 10:17 AM, ToddH <todd.huss.w...@gmail.com> wrote: > I'm interested in using Cucumber and Capybara to test non-rails (and > non-rack based) web applications. However, I'm still not clear on how > to generate the project structure for testing an external web > application. Is there a generator somewhere that I'm overlooking or > should I be creating the project files and structure by hand?
> Thanks!
> -- > You received this message because you are subscribed to the Google Groups > "Cukes" group. > To post to this group, send email to cukes@googlegroups.com. > To unsubscribe from this group, send email to > cukes+unsubscribe@googlegroups.com <cukes%2Bunsubscribe@googlegroups.com>. > For more options, visit this group at > http://groups.google.com/group/cukes?hl=en.
> I'm interested in using Cucumber and Capybara to test non-rails (and > non-rack based) web applications. However, I'm still not clear on how > to generate the project structure for testing an external web > application. Is there a generator somewhere that I'm overlooking or > should I be creating the project files and structure by hand?
> Thanks!
There isn't a generator I know of, but it's pretty simple to do by hand. In your project's root directory:
mkdir features mkdir features/support mkdir features/step_definitions
Then create a file features/support/env.rb which looks something like this:
Then just start creating features and follow Cucumber's snippets to create your step definitions. You should find Capybara's DSL methods are available to you in the step definitions (that's what the #World method does).
We are also using Capybara/Cucumber in a none rails env. We used a
similar approach as Matt mentions. At some point we wanted to divert
from this expected directory structure, since we had several projects
sharing some common Capybara, other steps and some extra defined ruby
modules. You can add a cucumber.yml file into the folder you'd like to
use to start your features with cucumber (google for details).
Basically you extend your cucumber require-path by chaining them "-r /
env_folder -r /feature_folder -r /step_folder ..." in the yaml file.
BR,
Bart
On Oct 12, 12:47 pm, Matt Wynne <m...@mattwynne.net> wrote:
> > I'm interested in using Cucumber and Capybara to test non-rails (and
> > non-rack based) web applications. However, I'm still not clear on how
> > to generate the project structure for testing an external web
> > application. Is there a generator somewhere that I'm overlooking or
> > should I be creating the project files and structure by hand?
> > Thanks!
> There isn't a generator I know of, but it's pretty simple to do by hand. In your project's root directory:
> mkdir features
> mkdir features/support
> mkdir features/step_definitions
> Then create a file features/support/env.rb which looks something like this:
> Then just start creating features and follow Cucumber's snippets to create your step definitions. You should find Capybara's DSL methods are available to you in the step definitions (that's what the #World method does).
On Tue, Oct 12, 2010 at 12:47 PM, Matt Wynne <m...@mattwynne.net> wrote: > Hi Todd,
> On 12 Oct 2010, at 05:47, ToddH wrote:
>> I'm interested in using Cucumber and Capybara to test non-rails (and >> non-rack based) web applications. However, I'm still not clear on how >> to generate the project structure for testing an external web >> application. Is there a generator somewhere that I'm overlooking or >> should I be creating the project files and structure by hand?
>> Thanks!
> There isn't a generator I know of, but it's pretty simple to do by hand. In your project's root directory:
> mkdir features > mkdir features/support > mkdir features/step_definitions
> Then create a file features/support/env.rb which looks something like this:
> Then just start creating features and follow Cucumber's snippets to create your step definitions. You should find Capybara's DSL methods are available to you in the step definitions (that's what the #World method does).
> -- > You received this message because you are subscribed to the Google Groups "Cukes" group. > To post to this group, send email to cukes@googlegroups.com. > To unsubscribe from this group, send email to cukes+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
Thanks for all the tips and suggestions! I've put together a
standalone cucumber starter project on Github to hopefully help other
people that want to do the same thing:
> that will include Capybara in the World for you and also set up some
> useful tags (@javascript, etc..)
> /Jonas
> On Tue, Oct 12, 2010 at 12:47 PM, Matt Wynne <m...@mattwynne.net> wrote:
> > Hi Todd,
> > On 12 Oct 2010, at 05:47, ToddH wrote:
> >> I'm interested in using Cucumber and Capybara to test non-rails (and
> >> non-rack based) web applications. However, I'm still not clear on how
> >> to generate the project structure for testing an external web
> >> application. Is there a generator somewhere that I'm overlooking or
> >> should I be creating the project files and structure by hand?
> >> Thanks!
> > There isn't a generator I know of, but it's pretty simple to do by hand. In your project's root directory:
> > Then just start creating features and follow Cucumber's snippets to create your step definitions. You should find Capybara's DSL methods are available to you in the step definitions (that's what the #World method does).
> > --
> > You received this message because you are subscribed to the Google Groups "Cukes" group.
> > To post to this group, send email to cukes@googlegroups.com.
> > To unsubscribe from this group, send email to cukes+unsubscribe@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/cukes?hl=en.