|
7 | 7 |
|
8 | 8 | context "with --help" do |
9 | 9 | it "shows long usage" do |
10 | | - expect{ subject.run %w[add --help] }.to output_fixture('cli/add/help') |
| 10 | + expect{ subject.run %w[add --help] }.to output_approval('cli/add/help') |
11 | 11 | end |
12 | 12 | end |
13 | 13 |
|
14 | 14 | context "without arguments" do |
15 | 15 | it "shows long usage" do |
16 | | - expect{ subject.run %w[add] }.to output_fixture('cli/generate/usage') |
| 16 | + expect{ subject.run %w[add] }.to output_approval('cli/generate/usage') |
17 | 17 | end |
18 | 18 | end |
19 | 19 |
|
|
25 | 25 | end |
26 | 26 |
|
27 | 27 | it "copies the strings configuration to the user space" do |
28 | | - expect { subject.run %w[add strings] }.to output_fixture('cli/add/strings') |
| 28 | + expect { subject.run %w[add strings] }.to output_approval('cli/add/strings') |
29 | 29 | expect(File).to exist(strings_file) |
30 | 30 | end |
31 | 31 |
|
|
41 | 41 |
|
42 | 42 | context "when the file exists" do |
43 | 43 | it "skips copying it" do |
44 | | - expect { subject.run %w[add strings] }.to output_fixture('cli/add/strings') |
45 | | - expect { subject.run %w[add strings] }.to output_fixture('cli/add/strings-exist') |
| 44 | + expect { subject.run %w[add strings] }.to output_approval('cli/add/strings') |
| 45 | + expect { subject.run %w[add strings] }.to output_approval('cli/add/strings-exist') |
46 | 46 | end |
47 | 47 | end |
48 | 48 | end |
|
55 | 55 | end |
56 | 56 |
|
57 | 57 | it "copies a sample function to the user space under lib directory" do |
58 | | - expect { subject.run %w[add lib] }.to output_fixture('cli/add/lib') |
| 58 | + expect { subject.run %w[add lib] }.to output_approval('cli/add/lib') |
59 | 59 | expect(File).to exist(lib_file) |
60 | 60 | end |
61 | 61 | end |
|
68 | 68 | end |
69 | 69 |
|
70 | 70 | it "copies the config.sh lib file to the user space" do |
71 | | - expect { subject.run %w[add config] }.to output_fixture('cli/add/config') |
| 71 | + expect { subject.run %w[add config] }.to output_approval('cli/add/config') |
72 | 72 | expect(File).to exist(lib_file) |
73 | 73 | end |
74 | 74 | end |
|
81 | 81 | end |
82 | 82 |
|
83 | 83 | it "copies the yaml.sh lib file to the user space" do |
84 | | - expect { subject.run %w[add yaml] }.to output_fixture('cli/add/yaml') |
| 84 | + expect { subject.run %w[add yaml] }.to output_approval('cli/add/yaml') |
85 | 85 | expect(File).to exist(lib_file) |
86 | 86 | end |
87 | 87 | end |
|
94 | 94 | end |
95 | 95 |
|
96 | 96 | it "copies the colors.sh lib file to the user space" do |
97 | | - expect { subject.run %w[add colors] }.to output_fixture('cli/add/colors') |
| 97 | + expect { subject.run %w[add colors] }.to output_approval('cli/add/colors') |
98 | 98 | expect(File).to exist(lib_file) |
99 | 99 | end |
100 | 100 | end |
|
0 commit comments