We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6f63c8 commit 1714546Copy full SHA for 1714546
test/lib/skunk/command_factory_test.rb
@@ -0,0 +1,27 @@
1
+# frozen_string_literal: true
2
+
3
+require "test_helper"
4
5
+require "skunk/command_factory"
6
+require "skunk/commands/default"
7
+require "skunk/commands/version"
8
9
+describe Skunk::CommandFactory do
10
+ describe ".command_class" do
11
+ context "when mode does not exist" do
12
+ it "returns the default command" do
13
+ command = Skunk::CommandFactory.command_class(:foo)
14
15
+ _(command).must_equal Skunk::Command::Default
16
+ end
17
18
19
+ context "when mode exists" do
20
+ it "returns the version command" do
21
+ command = Skunk::CommandFactory.command_class(:version)
22
23
+ _(command).must_equal Skunk::Command::Version
24
25
26
27
+end
0 commit comments