Sha256: 993cb6e26e8938b57f44482e5c9f8b854cdbb4babe2a15f0180b1b2e9ff4e173
Contents?: true
Size: 756 Bytes
Versions: 5
Compression:
Stored size: 756 Bytes
Contents
require 'spec_helper' module Alf::Shell::Operator describe Generator do subject{ Generator.run(argv) } before do subject.should be_a(Alf::Operator::NonRelational::Generator) subject.operands.should eq([]) end context "with empty args" do let(:argv){ %w{} } specify{ subject.size.should eq(10) subject.as.should eq(:num) } end context "with a size" do let(:argv){ %w{-- 2} } specify{ subject.size.should eq(2) subject.as.should eq(:num) } end context "with a size and a name" do let(:argv){ %w{-- 2 -- generated} } specify{ subject.size.should eq(2) subject.as.should eq(:generated) } end end end
Version data entries
5 entries across 5 versions & 1 rubygems