Skip to content

Commit a9aaaaa

Browse files
justin808claude
andcommitted
Fix bin/dev script test expectations
Fixes: - Update test expectations to match new ServerManager.start method signatures - Add verbose parameter expectations in dev_spec.rb - Require react_on_rails/dev module in test file to prevent NameError - Change from exact match to partial match for method calls to handle additional parameters The bin/dev script now accepts verbose parameter which changed the method signatures: - start(:static) → start(:static, "Procfile.dev-static-assets", verbose: verbose) - start(:production_like) → start(:production_like, verbose: verbose) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 7d1a289 commit a9aaaaa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

spec/react_on_rails/binstubs/dev_spec.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# frozen_string_literal: true
22

3+
require "react_on_rails/dev"
4+
35
RSpec.describe "bin/dev script" do
46
let(:script_path) { "lib/generators/react_on_rails/bin/dev" }
57

@@ -40,12 +42,12 @@ def setup_script_execution_for_tool_tests
4042

4143
it "supports static development mode" do
4244
script_content = File.read(script_path)
43-
expect(script_content).to include("ReactOnRails::Dev::ServerManager.start(:static)")
45+
expect(script_content).to include("ReactOnRails::Dev::ServerManager.start(:static")
4446
end
4547

4648
it "supports production-like mode" do
4749
script_content = File.read(script_path)
48-
expect(script_content).to include("ReactOnRails::Dev::ServerManager.start(:production_like)")
50+
expect(script_content).to include("ReactOnRails::Dev::ServerManager.start(:production_like")
4951
end
5052

5153
it "supports help command" do
@@ -67,7 +69,7 @@ def setup_script_execution_for_tool_tests
6769
allow_any_instance_of(Kernel).to receive(:require).with("bundler/setup").and_return(true)
6870
allow_any_instance_of(Kernel).to receive(:require).with("react_on_rails/dev").and_return(true)
6971

70-
expect(ReactOnRails::Dev::ServerManager).to receive(:start).with(:development)
72+
expect(ReactOnRails::Dev::ServerManager).to receive(:start).with(:development, "Procfile.dev", verbose: false)
7173

7274
load script_path
7375
end

0 commit comments

Comments
 (0)