|
75 | 75 | allow(install_generator).to receive(:`).with("which node").and_return("/path/to/bin") |
76 | 76 | expect(install_generator.send(:missing_node?)).to be false |
77 | 77 | end |
78 | | - |
79 | | - specify "when npm is exist" do |
80 | | - stub_const("RUBY_PLATFORM", "linux") |
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 | | - end |
84 | 78 | end |
85 | 79 |
|
86 | 80 | context "when detecting missing bin-files on *nix" do |
|
91 | 85 | allow(install_generator).to receive(:`).with("which node").and_return("") |
92 | 86 | expect(install_generator.send(:missing_node?)).to be true |
93 | 87 | end |
94 | | - |
95 | | - specify "when npm is missing" do |
96 | | - stub_const("RUBY_PLATFORM", "linux") |
97 | | - allow(install_generator).to receive(:`).with("which npm").and_return("") |
98 | | - expect(install_generator.send(:missing_npm?)).to be true |
99 | | - end |
100 | 88 | end |
101 | 89 |
|
102 | 90 | context "when detecting existing bin-files on windows" do |
|
107 | 95 | allow(install_generator).to receive(:`).with("where node").and_return("/path/to/bin") |
108 | 96 | expect(install_generator.send(:missing_node?)).to be false |
109 | 97 | end |
110 | | - |
111 | | - specify "when npm is exist" do |
112 | | - stub_const("RUBY_PLATFORM", "mswin") |
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 | | - end |
116 | 98 | end |
117 | 99 |
|
118 | 100 | context "when detecting missing bin-files on windows" do |
|
123 | 105 | allow(install_generator).to receive(:`).with("where node").and_return("") |
124 | 106 | expect(install_generator.send(:missing_node?)).to be true |
125 | 107 | end |
126 | | - |
127 | | - specify "when npm is missing" do |
128 | | - stub_const("RUBY_PLATFORM", "mswin") |
129 | | - allow(install_generator).to receive(:`).with("where npm").and_return("") |
130 | | - expect(install_generator.send(:missing_npm?)).to be true |
131 | | - end |
132 | 108 | end |
133 | 109 |
|
134 | 110 | context "when detecting Shakapacker installation" do |
|
0 commit comments