Questions tagged [aruba]

Aruba is an extension for Cucumber. Aruba enables Cucumber to test command-line applications written in any programming language.

Aruba extends Cucumber to support arbitrary command-line applications, which can be written in any programming language.

See also .

92 questions
9
votes
1 answer

Testing Ruby-based CLIs with Aruba and Bundler

I have an RSpec suite, run via Bundler, that is testing a number of different command-line applications using Aruba. It works fine ... as long as the command being tested is not itself written in Ruby using Bundler. But I cannot figure out how to…
Mark Reed
  • 91,912
  • 16
  • 138
  • 175
6
votes
2 answers

Testing a commandline application with cucumber/aruba/timecop: How to inject the context

The following scenario pretty much sums up my problem: Scenario: problems with subprocesses Given the date is 01/01/2012 10:31 When I run `ruby -e "puts Time.now"` Then the output should contain "10:31" It boils down to When I run ruby -e…
sebastiangeiger
  • 3,386
  • 7
  • 29
  • 37
5
votes
1 answer

Checking output from "command" should contain unexpected crash with NilClass

In an effort to use Cucumber for a command-line script, I've installed the aruba gem as per the instructions provided. It's in my Gemfile, I can verify that the correct version is installed and I've included require 'aruba/cucumber' in…
Agazoom
  • 618
  • 4
  • 19
5
votes
2 answers

How to test a gem that depends on Rails and uses Rails commands

I'm making a gem that executes Rails commands (rails g model Item for example). When I use it in a Rails project, everything works. The problem is testing it in development outside of a Rails project. I'm using cucumber with aruba to test if CLI…
Viktor
  • 2,623
  • 3
  • 19
  • 28
5
votes
1 answer

Defining the same phrase for both `Given` and `Then` steps

I'm looking for suggestions or best practices here. Sometimes I would like to give the same regex/phrase for 2 different steps using different prepositions. The case I see often is a phrase that makes sense in both Given and in Then steps. Given…
DragonFax
  • 4,625
  • 2
  • 32
  • 35
4
votes
3 answers

.NET Windows service executes batch file from system32 folder not install folder

The code for the service is as follows System.Diagnostics.Process proc = new System.Diagnostics.Process(); // Declare New Process var arguments = String.Format("--ip {0} --user {1} --passwd {2} --guest {3}…
Welsh King
  • 3,178
  • 11
  • 38
  • 60
4
votes
1 answer

How to resolve a Cucumber::Ambiguous match error while testing a CLI in Aruba

I'm learning to test a CLI with Aruba using this guide that is a few years old. I'm getting an error Cucumber::Ambiguous match error After looking through several examples of this kind of error, I'm still not sure what to do about it. Scenario:…
fontno
  • 6,642
  • 6
  • 36
  • 43
4
votes
4 answers

How do I test a Ruby command-line program with Cucumber that has a massive amount of output?

I'm building a Ruby command-line program, and using Cucumber and Aruba to test it. Aruba includes some really handy matchers, so I can test output with a few lines in the .feature file: When I run `myprogram` Then it should pass with: """ my…
mipadi
  • 398,885
  • 90
  • 523
  • 479
4
votes
3 answers

How can I test a Ruby command-line program that communicates with a web service?

I am building a Ruby command-line program that communicates with a web service. I am using Cucumber and Aruba to test the program. The problem is that I need to control the data returned from the web service; the program grabs a stream of user…
mipadi
  • 398,885
  • 90
  • 523
  • 479
3
votes
3 answers

Building and Testing Command Line Gem on TeamCity

I'm having some trouble testing a command line gem in a TeamCity build environment. I'm working on a gem for building various types of manifest files, elf_manifesto. It runs from the command line and I've successfully tested it with Cucumber, and…
DDubyah
  • 53
  • 7
3
votes
1 answer

Ruby gem CLI testing with Aruba

I am testing a gem with Aruba. My problem is that even when I do not have anything in bin directory the step When I run 'executable' is passing. Here is the scenario. Scenario: Send SMS When I run `serialsms` Then message should be…
Indika K
  • 1,332
  • 17
  • 27
3
votes
1 answer

Aruba not working with RSpec 3?

I'm trying to test a ruby command line script but am having troubles running tests with Cucumber-less Aruba in RSpec 3. Some weird errors, some obvious ones. e.g. weird: 1) test does something Failure/Error: run_simple("cli_test.rb -h", true) …
webgirl
  • 395
  • 1
  • 3
  • 12
3
votes
2 answers

How to test creation of files in home folder using Aruba

I wish to test a Ruby command line application with Aruba and Cucumber. The application has a switch to create a dot file (such as .my_app) in the current user's home folder. I prefer not to have the application create the file in the user's home…
sutch
  • 1,225
  • 1
  • 13
  • 28
3
votes
0 answers

trouble setting up cucumber to test without actually changing the file system

I have been struggling for a while with this problem. I'm trying to test a ruby CLI that uses a lot of fileutils operations like making directories and copying files, etc. But when I'm writing tests, I need some way to test the functionality without…
fontno
  • 6,642
  • 6
  • 36
  • 43
3
votes
0 answers

Cucumber/aruba testing interactively

Hi I'm currently playing around with cucumber/aruba testing and really like it so far. But I stumbled on a problem with interactivity. My App watches folders for changes and simply prints something like 'file changed' at the moment. If I type…
Playerwtf
  • 301
  • 1
  • 4
  • 12
1
2 3 4 5 6 7