Hmm. You know, this might be feasible. We would have to come up with a way of swapping out implementations of FileUtils::sh, but that's not too horrible. As long as popen3 works on JRuby, that should be a way of specing the shells. Very neat solution!
Daniel On Mon, Jun 22, 2009 at 12:03 AM, Rhett Sutphin <rh...@detailedbalance.net>wrote: > Hi, > > On Jun 21, 2009, at 11:39 PM, Tal Rotbart wrote: > > popen3 seems to work with jruby 1.3.0 (as least for me, and at least >> for stderr and stdout). >> > > Hey, neato. I was testing on jruby 1.1.3 which I see now is quite > decrepit. > > So using popen3 wouldn't require a baroque solution after all. There's a > small example of using popen3 to spec an interactive shell in shenandoah: > > > http://github.com/rsutphin/shenandoah/blob/b569a2aff4bdd7f41fe6da0fd31d677bcc85a772/spec/shenandoah/runner_spec.rb#L69 > > It runs an ad hoc script which starts up the shell with some known > parameters. I'm not sure if that's the best way to go for buildr or if > you'd want to create a temporary buildfile and define the specs based on > running the entire buildr executable. > > Rhett >