Sha256: ce559fc5ab03a180a2c7861ba62bb1e38ba1851f9c101cfbe1338e3d33b4a546

Contents?: true

Size: 475 Bytes

Versions: 1

Compression:

Stored size: 475 Bytes

Contents

require 'spec_helper'

module Kerplutz
  describe Executable do
    subject { Executable.new("test") }

    describe "#parse" do
      it "extracts the options from the arguments" do
        subject.add_option(Switch.new(:foo, ''))
        subject.parse(["--foo"]).should == [{ :foo => true }, []]
      end
    end

    describe "#banner" do
      it "has a sensible default" do
        subject.banner.should =~ /^Usage: rspec test \[OPTIONS\]$/
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kerplutz-0.1.0 spec/kerplutz/executable_spec.rb