Sha256: 211ae2bcdb9c71f55ada9dc0424d0cf2c7c4c26369562df9ccc11b7424d5ac0b
Contents?: true
Size: 655 Bytes
Versions: 10
Compression:
Stored size: 655 Bytes
Contents
require 'spec_helper' describe Clamp::Command do include OutputCapture describe "with included module" do before do shared_options = Module.new do extend Clamp::Option::Declaration option "--size", "SIZE", :default => 4 end @command_class = Class.new(Clamp::Command) do include shared_options def execute puts "size = #{size}" end end @command = @command_class.new("foo") end it "accepts options from included module" do @command.run(["--size", "42"]) stdout.should == "size = 42\n" end end end
Version data entries
10 entries across 10 versions & 2 rubygems