0

I have the "foo.feature" file and I want to execute the commands in this file via Rake:

rake feature['foo.feature',100000]

The first argument (or what is it) is completely clear, but what about the other one? Is it an amount of scripts executions or something like this?

Unfortunately I am unable to find this in the docs.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
FrozenHeart
  • 19,844
  • 33
  • 126
  • 242

1 Answers1

2

If memory serves, that is the syntax used to call rake feature and deliver two arguments to the feature task, namely 'foo.feature' and 100000.

You'll want to look into your rakefile and see what is expected for the task in question.

For what it's worth, it's an unwieldily and error-prone syntax. There are better libraries to build scripts that accept arguments and options such as OptionParse or Thor. Even better, use rake as a replacement for make, and use something else to develop shell-based commands.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Denis de Bernardy
  • 75,850
  • 13
  • 131
  • 154
  • You mean that my task is expected these arguments ("foo.feature" and 100000)? If so, nope, there are no such things. More interestingly, if I change 100000 to 0, commands in the "foo.feature" file will not be executed at all – FrozenHeart Dec 12 '14 at 20:40
  • 1
    Well, the thing that's likely missing in your question to make any sense of what you're doing, is the definition of your task. That said, per my answer, what you're using is the syntax to pass command line arguments: http://stackoverflow.com/questions/825748/how-do-i-pass-command-line-arguments-to-a-rake-task – Denis de Bernardy Dec 12 '14 at 20:42
  • In practice there is a Cucumber definitions in the "foo.feature" file like this -- http://pastie.org/9777186 – FrozenHeart Dec 12 '14 at 20:44
  • 1
    Might be... but what counts is what's in your rakefile. This is where rake finds its task definitions. – Denis de Bernardy Dec 12 '14 at 20:47