levinmr / rspec-snapshot

RSpec snapshot testing.
MIT License
148 stars 38 forks source link

Updating snapshots #20

Closed harrylewis closed 3 years ago

harrylewis commented 4 years ago

Hi @yesmeck,

I love this tool, it's really helped my team to build a clean and consistent component system, and ensure there are no regressions with our outputted HTML!

I discovered by running the tests with these matchers that the snapshots are automatically created the first time. However, after looking through the documentation and code, it doesn't look like there is an ability to overwrite the snapshots on demand, if they have changed intentionally. Is this true?

It is a feature I would love, and be interested in proposing a PR for. I don't think rspec allows custom CLI flags, but this could be achieved through an environment variable, which seems typically to be how custom functionality like that is achieved.

Curious to hear your thoughts!

Edit: I'm not even sure if Jest snapshots allows this kind of functionality.

yesmeck commented 4 years ago

@harrylewis Do you interest in maintaining this project?

ufo2mstar commented 4 years ago

Hey @yesmeck , I notice this project hasn't been active in a while and I noticed your interest in getting new PRs in the past.. and more recently even looking for maintainers ☝️

What are your future plans for this project? Would be great to have a blurb up on the README please 😄

yesmeck commented 4 years ago

@ufo2mstar Since I don't use Ruby for my daily works for a long time, I hope someone can take over the ownership of this gem.

ufo2mstar commented 4 years ago

@yesmeck I see.. I don't work on Ruby for work either 😓 just a hobby, and I love the language.

I haven't taken up any OpenSource projects to maintain before. But I can take a look at it for a bit, will keep you posted if I have the time.

In the meantime, I see some open PRs pending merge, are any of those features you are intending to merge in before transferring ownership Wei Zhu?

yesmeck commented 4 years ago

Actually I have a next branch which uses awesome_print as the default serializer and added an environment variable to allow to update snapshot. I was planning release 2.0 based on the next branch, but I did not make it happen.

yesmeck commented 4 years ago

I've transferred this repo to @harrylewis

ufo2mstar commented 4 years ago

@harrylewis I've made some tweaks to support proper object serialization for validation (like Jest does with Json serialization of js objects) and started making some changes to standardize way to name objects automatically (again, similar to jest snapshots) but haven't had time to properly test and merge these.. Also posting here if anyone wants to pick this up and integrate the idea completely

harrylewis commented 4 years ago

@ufo2mstar thanks for taking the time to do that work. Feel free to create a PR whenever you're comfortable. I didn't see a relevant PR so I assume there isn't one yet?

edmorley commented 3 years ago

@harrylewis Hi! I don't suppose it would be possible to release a new version based on the next branch? I see #10 would add support for the updating snapshots feature, but it's only on next at the moment. Many thanks :-)

harrylewis commented 3 years ago

@edmorley thanks for reaching out! I will be taking a look over the next little while at cutting a new release. Thanks in advance for your patience.

levinmr commented 3 years ago

@harrylewis Hi, is there any update on this? I may be interested in helping to maintain this project as it is very useful and needs some attention

harrylewis commented 3 years ago

@levinmr thanks for reaching out about this! I haven't been able to find the time that I'd like to spend on this gem. I'd be happy to get you involved as a maintainer. Would you be interesting in taking over ownership of the repository?

levinmr commented 3 years ago

@harrylewis sure. I could take ownership if you no longer have the time

harrylewis commented 3 years ago

Thank you @levinmr 🙏 I just sent over a "transfer ownership" request.

levinmr commented 3 years ago

This is resolved with version 2.0.0 However I need @harrylewis or @yesmeck to add me as an owner on rubygems.org

https://rubygems.org/profiles/levinmr

harrylewis commented 3 years ago

@levinmr I've just added you as an owner of the gem on RubyGems, let me know if you received that!

levinmr commented 3 years ago

Great thanks. I was able to publish the new version. Closing this issue now