Giter Club home page Giter Club logo

Comments (7)

mullermp avatar mullermp commented on July 3, 2024

response_target isn't a member of the API so it's not something that can be stubbed. Are you using rspec? You should be able to mock that with expect(File).to receive(:write)... or something equivalent. I can look to see if we can add an easier way to do this.

from aws-sdk-ruby.

tke578 avatar tke578 commented on July 3, 2024

@mullermp that makes sense then. It looks like its handed by the Seahorse client.

As a temp solution, I was able to have the file exist(file fixture) in my test suite so something like rails_root_project/test/fixtures/files/the_name_of_the_file and making sure that $the_name_of_the_file is the same name in my test suite(response_target)

No, I am not using Rspec.
Thanks!

from aws-sdk-ruby.

mullermp avatar mullermp commented on July 3, 2024

Just curious, how are you testing if not with rspec? With mini test?

You can also consider Tempfile somehow, but I'm not sure what your current test setup and logic looks like.

from aws-sdk-ruby.

tke578 avatar tke578 commented on July 3, 2024

Apologies. Yes, minitest.
That could also work.

from aws-sdk-ruby.

tke578 avatar tke578 commented on July 3, 2024

@mullermp Should I close this issue since its outside the scope of this gem?

from aws-sdk-ruby.

mullermp avatar mullermp commented on July 3, 2024

Yes. Thank you. Sorry that you ran into this, but I do believe mocking is correct for this feature.

from aws-sdk-ruby.

github-actions avatar github-actions commented on July 3, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

from aws-sdk-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.