Giter VIP home page Giter VIP logo

Comments (3)

derekcannon avatar derekcannon commented on June 1, 2024 1

I think it would also be nice to include hashes in the built-in serializers. This would make testing formatters/helpers very simple. Especially those that return large lists of data. From what I see, the .snap files are on one line. I would also appreciate hash serialization it to be multiline and human readable. This way .snaps could be committed and compared easily in PRs.

from rspec-snapshot.

levinmr avatar levinmr commented on June 1, 2024 1

done in 2.0.0

from rspec-snapshot.

rrcobb avatar rrcobb commented on June 1, 2024

#8 adds some new configuration options and changes the default serializer. With a little work, I think it could use a different serializer.

It might be good (but maybe not necessary) for a serializer to support both dump and load, so that it could be used in either direction (in case, for instance, you wanted to load the output of one test as the mock for another test)

class DefaultSerializer
  def dump(object)
    object.to_s
  end

  def load(str)
     str.to_object # not actually a method, huh
  end
end

from rspec-snapshot.

Related Issues (18)

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.