File tree 2 files changed +30
-12
lines changed
2 files changed +30
-12
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ require "spec_helper"
5
+
6
+ module Tapioca
7
+ class CliSpec < SpecWithProject
8
+ describe "Tapioca::Cli" do
9
+ before do
10
+ @command_stub = mock ( run : nil )
11
+ end
12
+
13
+ it "passes through the `lsp_addon` flag to the DslGenerate command" do
14
+ Commands ::DslGenerate . expects ( :new ) . with do |options |
15
+ options [ :lsp_addon ] == true
16
+ end . returns ( @command_stub )
17
+
18
+ capture_io { Cli . start ( [ "dsl" , "--lsp_addon" ] ) }
19
+ end
20
+
21
+ it "does not pass through the `lsp_addon` flag to the DslGenerate command if not present" do
22
+ Commands ::DslGenerate . expects ( :new ) . with do |options |
23
+ options [ :lsp_addon ] . nil?
24
+ end . returns ( @command_stub )
25
+
26
+ capture_io { Cli . start ( [ "dsl" , "--another-flag" ] ) }
27
+ end
28
+ end
29
+ end
30
+ end
You can’t perform that action at this time.
0 commit comments