-
Hi y'all! I have a model with such an unique index:
```js
schema.index({ userId: 1, labelId: 1 }, { unique: true })
```
So I find myself repeating the following code:
```js
Model.findOne({ c…
gunar updated
7 years ago
-
Given this this class and this factory definition:
```ruby
DataClass = Struct.new(:x, :y, :z)
FactoryGirl.define do
factory :parent_factory, class: DataClass do
x 1
trait :y do
…
-
We have to rewrite our test cases to use FactoryGirl instead.
Fixtures need to go!
https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md
tsov updated
11 years ago
-
We should put together a getting started guide for RSpec. This content will probably be completely new.
Inspiration:
- [Getting Started with Rails](http://guides.rubyonrails.org/getting_started.html)…
-
Hi there,
I like girl grown up and became lady.
Is there any example of how you would write fixtures with Sequelize?
Thanks,
Sanjay
ghost updated
10 years ago
-
-
Well, I would like to have a feature to generate factory for the model to be generated instead of fixtures when using --shoulda option.
Has this been done in any forks of this nifty-generator?
If yes,…
-
The biggest reason to use factories instead of fixtures is that the properties are not static, so your tests aren't depending on static "magic" values. [This article](https://semaphoreci.com/blog/2014…
-
I am having an issue using Factory girl with Jest.
When I create a factory, like this one:
`const person = await factory.create('Person');`
Inside a test, I get the following warn on Jest:
```
…
-
Phez currently has no tests. Would you like to contribute?
Ideally we'd use Factory Girl over rails stock yaml fixtures.
Testing framework suggestions? I'm open if you're willing to contribute.