- 
                Notifications
    
You must be signed in to change notification settings  - Fork 0
 
Add spec files for mars components #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add spec files for mars components #10
Conversation
| 
           Cursor Agent can help with this pull request. Just   | 
    
| 
               | 
          ||
| RSpec/MultipleExpectations: | ||
| Enabled: false | ||
| 
               | 
          ||
| RSpec/ExampleLength: | ||
| Enabled: false | ||
| 
               | 
          ||
| RSpec/VerifiedDoubleReference: | ||
| Enabled: false | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSpec/VerifiedDoubleReference: Enabled: false
was added because of the instance_double line for skipping this rubocop offense:
spec/mars/agent_spec.rb:7:23: C: [Correctable] RSpec/VerifiedDoubleReference: Use a constant class reference for verified doubles. String references are not verifying unless the class is loaded.
    instance_double("RubyLLM::Chat").tap do |mock|
I think it depends if we want to keep that test that is mocking the rubyllm chat in agent_spec.rb
        
          
                spec/mars/agent_spec.rb
              
                Outdated
          
        
      | allow(agent).to receive(:chat).and_return(mock_chat) | ||
| allow(mock_chat).to receive(:ask).with("test input").and_return("response") | ||
| 
               | 
          ||
| result = agent.run("test input") | ||
| 
               | 
          ||
| expect(result).to eq("response") | ||
| expect(mock_chat).to have_received(:ask).with("test input") | ||
| end | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
everything is so mocked that I'm not sure these tests add value at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using AI for tests it usually generates all this. It happened to me but I trimmed it to just the tests that add value, check https://github.com/rootstrap/mars/blob/main/spec/mars/workflows/sequential_spec.rb and https://github.com/rootstrap/mars/blob/main/spec/mars/runnable_spec.rb as examples
Co-authored-by: santiago.d.diaz <[email protected]>
Co-authored-by: santiago.d.diaz <[email protected]>
Co-authored-by: santiago.d.diaz <[email protected]>
ba6eb49    to
    8ceb7cd      
    Compare
  
    
Add new spec files for
Mars::Agent,Mars::AggregatorandMars::Gateto improve test coverage.