Sha256: 883bc41b6297e888cac087d727b6c57be1a3083c8397a0c0bf5cc4fe017c1b3d
Contents?: true
Size: 533 Bytes
Versions: 14
Compression:
Stored size: 533 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' require 'mspec/helpers/argv' describe Object, "#argv" do before :each do ScratchPad.clear @saved_argv = ARGV @argv = ["a", "b"] end it "replaces and restores the value of ARGV" do argv @argv ARGV.should == @argv argv :restore ARGV.should == @saved_argv end it "yields to the block after setting ARGV" do argv @argv do ScratchPad.record ARGV end ScratchPad.recorded.should == @argv ARGV.should == @saved_argv end end
Version data entries
14 entries across 14 versions & 1 rubygems