Sha256: 5192f18f4e39120d747531fa7f272b45bf1b9d03637b8b25b4f048a5e103f7ee

Contents?: true

Size: 570 Bytes

Versions: 1

Compression:

Stored size: 570 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

require "stringio"

describe "IGem" do

  before do
    $stdout = StringIO.new
  end

  def output
    $stdout.string
  end

  after do
    $stdout = STDOUT
  end

  it "can execute a ruby file" do
    igem "spec/helpers/example.rb hello", :fork => false
    output.should == "hello"
  end

  it "can fork" do
    igem "spec/helpers/example.rb hello", :fork => true
    output.should == ""
  end

  it "will fork by default" do
    igem "spec/helpers/example.rb hello"
    output.should == ""
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
igem-0.0.0 spec/igem_spec.rb