To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorOptions
Pass the --test-data
(or -F
) option to preconfigure the tests with Rails Fixtures, Factory Girl or Fabrication libraries. Fixtures is the default.
- Background
-
- Given
- hew is installed
- Scenarios
-
- Without `-F` option
- `-F` Rails Fixtures
- `-F` Factory Girl
- `-F` Fabrication
- Unsupported `-F` option
- `--help`
- Without `-F` option
-
- When
-
I run
rails generate hew User
- Then
-
the output should contain:
create spec/fixtures/users.yml
- `-F` Rails Fixtures
-
- When
-
I run
rails generate hew User -F fixtures -s
- Then
-
the output should contain:
create spec/fixtures/users.yml
- `-F` Factory Girl
-
- When
-
I run
rails generate hew User -F factory_girl -s
- Then
-
the output should contain:
create spec/factories/users.rb
- `-F` Fabrication
-
- When
-
I run
rails generate hew User -F fabrication -s
- Then
-
the output should contain:
create spec/fabricators/user_fabricator.rb
- Unsupported `-F` option
-
- When
-
I run
rails generate hew User -F=factory_boy
- Then
-
the output should contain:
factory_boy library is not supported. Supported options are: fixtures/factory_girl/fabrication.
- `--help`
-
- When
-
I run
rails generate hew --help
- Then
-
the output should contain:
Usage: rails generate hew NAME [field[:type] field[:type]] [options] Options: [--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated applications) -F, [--test-data=TEST_DATA] # Indicates the test data library (options: fixtures/factory_girl/fabrication) # Default: fixtures
Last published over 6 years ago by andrii.