File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 77 execjs (~> 2.5 )
88 rails (>= 5.2 )
99 rainbow (~> 3.0 )
10- shakapacker (~> 8.0 )
10+ shakapacker (~> 8.2 )
1111
1212GEM
1313 remote: https://rubygems.org/
Original file line number Diff line number Diff line change 2828 end
2929
3030 it "removes stale overmind socket files" do
31- allow ( File ) . to receive ( :exist? ) . and_return ( false ) # Default to false for any other files
31+ # Setup File.exist? stubs for all expected calls
32+ allow ( File ) . to receive ( :exist? ) . and_call_original
3233 allow ( File ) . to receive ( :exist? ) . with ( ".overmind.sock" ) . and_return ( true )
3334 allow ( File ) . to receive ( :exist? ) . with ( "tmp/sockets/overmind.sock" ) . and_return ( false )
3435 allow ( File ) . to receive ( :exist? ) . with ( "tmp/pids/server.pid" ) . and_return ( false )
3536
36- expect ( File ) . to receive ( :delete ) . with ( ".overmind.sock" ) . and_return ( nil )
37+ # Setup File.delete expectation
38+ expect ( File ) . to receive ( :delete ) . with ( ".overmind.sock" ) . and_return ( 1 )
3739
3840 result = described_class . cleanup_stale_files
3941 expect ( result ) . to be true
Original file line number Diff line number Diff line change 77 describe ".generate" do
88 it "runs pack generation successfully in verbose mode" do
99 command = "bundle exec rake react_on_rails:generate_packs"
10- allow ( Kernel ) . to receive ( :system ) . with ( command ) . and_return ( true )
10+ allow ( described_class ) . to receive ( :system ) . with ( command ) . and_return ( true )
1111
1212 expect { described_class . generate ( verbose : true ) } . to output . to_stdout_from_any_process
1313 end
1414
1515 it "runs pack generation successfully in quiet mode" do
1616 command = "bundle exec rake react_on_rails:generate_packs > /dev/null 2>&1"
17- allow ( Kernel ) . to receive ( :system ) . with ( command ) . and_return ( true )
17+ allow ( described_class ) . to receive ( :system ) . with ( command ) . and_return ( true )
1818
1919 expect { described_class . generate ( verbose : false ) } . not_to output . to_stdout_from_any_process
2020 end
2121
2222 it "exits with error when pack generation fails" do
2323 command = "bundle exec rake react_on_rails:generate_packs > /dev/null 2>&1"
24- allow ( Kernel ) . to receive ( :system ) . with ( command ) . and_return ( false )
24+ allow ( described_class ) . to receive ( :system ) . with ( command ) . and_return ( false )
2525
2626 expect { described_class . generate ( verbose : false ) } . to raise_error ( SystemExit )
2727 end
You can’t perform that action at this time.
0 commit comments