|
78 | 78 |
|
79 | 79 | specify "when npm is exist" do |
80 | 80 | stub_const("RUBY_PLATFORM", "linux") |
81 | | - allow(install_generator).to receive(:`).with("which yarn").and_return("/path/to/bin") |
82 | | - expect(install_generator.send(:missing_yarn?)).to be false |
| 81 | + allow(install_generator).to receive(:`).with("which npm").and_return("/path/to/bin") |
| 82 | + expect(install_generator.send(:missing_npm?)).to be false |
83 | 83 | end |
84 | 84 | end |
85 | 85 |
|
|
94 | 94 |
|
95 | 95 | specify "when npm is missing" do |
96 | 96 | stub_const("RUBY_PLATFORM", "linux") |
97 | | - allow(install_generator).to receive(:`).with("which yarn").and_return("") |
98 | | - expect(install_generator.send(:missing_yarn?)).to be true |
| 97 | + allow(install_generator).to receive(:`).with("which npm").and_return("") |
| 98 | + expect(install_generator.send(:missing_npm?)).to be true |
99 | 99 | end |
100 | 100 | end |
101 | 101 |
|
|
110 | 110 |
|
111 | 111 | specify "when npm is exist" do |
112 | 112 | stub_const("RUBY_PLATFORM", "mswin") |
113 | | - allow(install_generator).to receive(:`).with("where yarn").and_return("/path/to/bin") |
114 | | - expect(install_generator.send(:missing_yarn?)).to be false |
| 113 | + allow(install_generator).to receive(:`).with("where npm").and_return("/path/to/bin") |
| 114 | + expect(install_generator.send(:missing_npm?)).to be false |
115 | 115 | end |
116 | 116 | end |
117 | 117 |
|
|
124 | 124 | expect(install_generator.send(:missing_node?)).to be true |
125 | 125 | end |
126 | 126 |
|
127 | | - specify "when yarn is missing" do |
| 127 | + specify "when npm is missing" do |
128 | 128 | stub_const("RUBY_PLATFORM", "mswin") |
129 | | - allow(install_generator).to receive(:`).with("where yarn").and_return("") |
130 | | - expect(install_generator.send(:missing_yarn?)).to be true |
| 129 | + allow(install_generator).to receive(:`).with("where npm").and_return("") |
| 130 | + expect(install_generator.send(:missing_npm?)).to be true |
131 | 131 | end |
132 | 132 | end |
133 | 133 | end |
0 commit comments