This message was imported from the Ruby/Rails Modularity Slack server. Find more info in the import thread.
Has anyone found a way to make pack-specific test fixtures with rspec? Seems like fixture_path
config wants a single directory.
This message was imported from the Ruby/Rails Modularity Slack server. Find more info in the import thread.
Has anyone found a way to make pack-specific test fixtures with rspec? Seems like fixture_path
config wants a single directory.
Message originally sent by slack user U71TN2WF04X
I tried the same thing but with no success as of now I am leaving the fixtures outside my packs
@AlexEvanczuk No one in Gusto feeling this pain?
Message originally sent by slack user U71TN2WF04X
I created an issue in the packs-rails repository to start the discussion and see if we can find a solution
No we aren’t @gpassero – we actually don’t use Rails fixtures at Gusto – just factorybot.
I think that this would be a great place for our community to contribute upstream!!
I could see Rails accepting a PR to allow that configuration to accept an array or even a glob!
Message originally sent by slack user U71TN2WF04X
Exactly, I think that would be the best solution, and then include the path of each pack in the configuration.
Yes! The simplest way would probably be to Dir.glob
so you don’t need to update the config every time you change a pack. It would be great if packs-rails
could automatically append to the test fixtures path with pack paths, but we’d need that upstream capability first.
Message originally sent by slack user U71TN2WF04X
Found an issue on rails github. I am not sure if this is exactly what we are looking for, but its a start
The fixtures path can be a glob pattern:
??
That’s closed, though… were changes required?
Message originally sent by slack user U71TN2WF04X
From what I read, seems like changes were needed but no one managed to make it work…
No PR was created (I believe) since it would appear on the issue if it was mentioned.
Message originally sent by slack user U71TN2WF04X
Found this commit
Soon!