0

Is it possible to execute an rspec command (usually executed in Terminal) using Shoes?

More detailed: I want to create some kind of GUI with a few buttons. Every button should execute a different command usually executed in Terminal.

So, I want to start my Shoes app -> click a button -> the button opens Terminal and executes a command (something like "cd /Users/Documents/test" and then "rspec test_spec.rb". I'm a Ruby and Shoes newbie, so if there is a better/easier way to do this for a newbie - please suggest.

OS: Mac OSX

Thank you!

Crow
  • 11
  • 1

1 Answers1

0

Shoes is just a ruby program, so you can do whatever ruby does. So this stack overflow question should hold your answers.

For instance this works and returns the result:

2.2.2 :004 > `pwd` => "/home/tobi\n"

You can run the commands, capture the output and then display it in your shoes application anyway you like.

Community
  • 1
  • 1
PragTob
  • 546
  • 2
  • 15