Sha256: e5442b9b486ee24c5f37913ec32917639484f750669c1cb912924730cbf47cf1
Contents?: true
Size: 1.09 KB
Versions: 2
Compression:
Stored size: 1.09 KB
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 'force-reload'" do let(:args) { %w[force-reload] } its(:command) { should be(:force_reload) } 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
magic_reveal-2.6.1.2 | spec/magic_reveal/cli/options_spec.rb |
magic_reveal-2.6.1.1 | spec/magic_reveal/cli/options_spec.rb |