Sha256: 5c8b8d0e6729e78af70bbc68d174388fcb1e9a17eaeacd0e3d8668162628492b
Contents?: true
Size: 984 Bytes
Versions: 4
Compression:
Stored size: 984 Bytes
Contents
require 'spec_helper' require 'magic_reveal/cli/options' describe MagicReveal::Cli::Options do describe ".parse" do before { subject.parse args } context "given 'new <project>'" do let(:args) { %w{new someproject} } its(:command) { should be(:new) } its(:project) { should eq('someproject') } end context "given 'new <project> extrajunk'" do let(:args) { %w{new someproject extrajunk} } its(:command) { should be(:help) } its(:project) { should be_nil } end context "given 'start'" do let(:args) { %w[start] } its(:command) { should be(:start) } end context "given 'static'" do let(:args) { %w[static] } its(:command) { should be(:static) } end context "given 'help'" do let(:args) { %w{help} } its(:command) { should be(:help) } end context "given no arguments" do let(:args) { [] } its(:command) { should be(:help) } end end end
Version data entries
4 entries across 4 versions & 1 rubygems