Re: [Cucumber] How to: include | run | use features and step definitions contained in another gem

27 views
Skip to first unread message

aslak hellesoy

unread,
Jul 25, 2012, 6:01:13 PM7/25/12
to cu...@googlegroups.com
On Wed, Jul 25, 2012 at 6:03 PM, Marcos Rocha <marcos...@gmail.com> wrote:
> Hi to all.
>
> Given this project structure:
> -gem core-template (contains some features)
> -gem foo-template (a blue theme)
> -gem bar-template (a red theme)
> -gem .*-template (so on)
>

I don't understand what kind of structure this represents. Files and
paths? Do you have a directory that starts with "-gem"?

Aslak

> where all "template" gems *must* run and pass some tests contained in
> core-template.
>
> How can I run the features contained in another gem(s)?
>
> In another words: how do I run
> cucumber examples/i18n/en/features (the cucumber i18n features examples)
> Inside a brand new gem?
>
> --
> -- Rules --
>
> 1) Please prefix the subject with [Ruby], [JVM] or [JS].
> 2) Please use interleaved answers
> http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
> 3) If you have a question, don't reply to an existing message. Start a new
> topic instead.
>
> You received this message because you are subscribed to the Google Groups
> Cukes group. To post to this group, send email to cu...@googlegroups.com. To
> unsubscribe from this group, send email to
> cukes+un...@googlegroups.com. For more options, visit this group at
> https://groups.google.com/d/forum/cukes?hl=en
>
>

Marcos Rocha

unread,
Jul 25, 2012, 7:35:49 PM7/25/12
to cu...@googlegroups.com
More details:

I have two rails projects (A and B) with the following gems, among others:
#project A
gem "green_theme", :path => "~/dev/themes/green_theme"
gem "devel_tasks", :path => "~/dev/themes/devel_tasks"

#project B
gem "red_theme", :path => "~/dev/themes/red_theme"
gem "devel_tasks", :path => "~/dev/themes/devel_tasks"

Both projects, A and B, have a features dir for features and steps.
Both themes, red and green, should have common functionalities like
login/logout buttons, html meta-tags, and so on.

What I need to do is place the commom theme related features and steps
inside the devel_tasks gem. This way I can share the tests and use
them to check if a given template is compliant with the standard.

A simple way to test what I need to do is create a new rails project
with a sample cucumber feature, then try to run "cucumber
examples/i18n/en/features".

Thanks for your time.




2012/7/25 aslak hellesoy <aslak.h...@gmail.com>:
--
Att,
Marcos Rocha
+55 61 82125959
--

Marcos Rocha

unread,
Jul 26, 2012, 1:26:58 PM7/26/12
to cu...@googlegroups.com
No success with cucumber --require <paths>.

Anyone have success testing this?

2012/7/25 Marcos Rocha <marcos...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages