Comments (6)
Sounds like a good idea to me. Feel like forking and giving it a go?
You'd have to find somewhere to store each index, and have a hook to reset them before each test much the way Sham does.
from machinist.
I added this on my fork of Machinist with specs: jeremydurham/machinist@35a38d9715caf52cb33a6e73c65e0391c8c95bff
from machinist.
Thanks Jeremy, that's what I'm looking for.
One nit: index should probably match Sham and start with 1 rather than 0.
from machinist.
Good call; I wondered about this but didn't take the time to look and see what Sham does. Updated: jeremydurham/machinist@a52de812478265301726dad00c91af66de8b2656
from machinist.
+1 to jeremydurham's changes. I've been using them and they work great.
from machinist.
Ok, finally cleaning up these old tickets!
I think this is a great idea, but I've found people are already confused by Sham and indexing, and having indexes in another place as well would just add to the confusion.
I'm preparing a pre-release of Machinist 2, and the road I've gone down there (for a bunch of reasons) is to throw out Sham, and do everything with indexes in blueprints.
So, in short, your idea wins, and my original idea is going out the window. I'll add you to the list of contributors to Machinist 2, Jeremy. Thanks for the discussion and the work!
from machinist.
Related Issues (20)
- More of a feature request: switchable associations HOT 3
- Incompatible with presence validation on associated record HOT 3
- Machinist2 and dirty tracking HOT 1
- Allow "make" to take a block
- rspec issue: no master blueprint defined HOT 3
- Update Machinist Wiki
- 1.0 Maintenance: Object#type Deprecation warning
- Blueprint file not found when using Capybara and spec HOT 3
- calling `make` or `make!` on an association does not set the new object's association to the calling object HOT 4
- Role Model printing: #<Machinist::ActiveRecord::Lathe: HOT 2
- sn method does not work
- When the association being passed to make!, machinist should not instantiate it HOT 1
- Problem with models that use FriendlyID HOT 1
- Association named 'test' raise the error "wrong number of arguments (given 0, expected 2..3)"
- Allow me to push to Machinist on Rubygems
- Feature request: post processing after object is initialized HOT 1
- Installation problem HOT 1
- Blueprint for has_one associations HOT 7
- Admin::User.blueprint doesn't work HOT 3
- Machinist make! generate a model that raise ActiveRecord::RecordNotFound on reload HOT 1
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 machinist.