Comments (3)
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 .snap
s could be committed and compared easily in PRs.
from rspec-snapshot.
done in 2.0.0
from rspec-snapshot.
#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)
- Possible to cut a new release? HOT 1
- Showing line-by-line diff when snapshot is different HOT 3
- Command to Update Snapshot automatically. HOT 1
- README should mention how we create the snapshots HOT 2
- please add license
- Try to stringify `@actual` during comparison HOT 6
- Updating snapshots HOT 17
- Break old test after add gem HOT 1
- Make failure message nicer when used as an argument matcher HOT 1
- Fix CI build intermittent failures HOT 2
- Tests pass in CI if no snapshot is found HOT 1
- don't write snapshot when negated
- Project status? HOT 4
- Fails if snapshot_name has forward slashes HOT 3
- How to deal with obsolete files? HOT 1
- Issues with Object Comparison HOT 2
- Making the snapshot name optional HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rspec-snapshot.