Skip to content

Commit 163b310

Browse files
committed
Test correction
1 parent 20aa562 commit 163b310

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

test/lib/tailwindcss/commands_test.rb

+11-3
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,13 @@ def setup
139139
Dir.mktmpdir do |tmpdir|
140140
root = Pathname.new(tmpdir)
141141

142-
# Create two engines
142+
# Create multiple engines
143143
engine_root1 = root.join('engine1')
144144
engine_root2 = root.join('engine2')
145+
engine_root3 = root.join('engine3')
145146
FileUtils.mkdir_p(engine_root1)
146147
FileUtils.mkdir_p(engine_root2)
148+
FileUtils.mkdir_p(engine_root3)
147149

148150
engine1 = Class.new(Rails::Engine) do
149151
define_singleton_method(:engine_name) { "test_engine1" }
@@ -155,7 +157,12 @@ def setup
155157
define_singleton_method(:root) { engine_root2 }
156158
end
157159

158-
# Create mock specs for both engines
160+
engine3 = Class.new(Rails::Engine) do
161+
define_singleton_method(:engine_name) { "test_engine3" }
162+
define_singleton_method(:root) { engine_root3 }
163+
end
164+
165+
# Create mock specs for engines
159166
spec1 = Minitest::Mock.new
160167
spec1.expect(:dependencies, [Gem::Dependency.new("tailwindcss-rails")])
161168

@@ -183,7 +190,8 @@ def setup
183190

184191
find_by_name_results = {
185192
"test_engine1" => spec1,
186-
"test_engine2" => spec2
193+
"test_engine2" => spec2,
194+
"test_engine3" => spec3,
187195
}
188196

189197
Gem::Specification.stub(:find_by_name, ->(name) { find_by_name_results[name] }) do

0 commit comments

Comments
 (0)