File tree Expand file tree Collapse file tree 1 file changed +2
-20
lines changed Expand file tree Collapse file tree 1 file changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -117,24 +117,6 @@ If you are not using `factory_bot` look at `e2e/cypress/app_commands/factory_bot
117
117
118
118
Now you can create scenarios and commands that are plain Ruby files that get loaded through middleware, the ruby sky is your limit.
119
119
120
- ### Update your database.yml
121
-
122
- When writing and running tests on your local computer, it's recommended to start your server in development mode so that changes you
123
- make are picked up without having to restart your local server.
124
-
125
- It's recommended you update your ` database.yml ` to check if the ` CYPRESS ` environment variable is set and switch it to the test database
126
- otherwise, cypress will keep clearing your development database.
127
-
128
- For example:
129
- ``` yaml
130
- development :
131
- << : *default
132
- database : <%= ENV['CYPRESS'] ? 'my_db_test' : 'my_db_development' %>
133
- test :
134
- << : *default
135
- database : my_db_test
136
- ` ` `
137
-
138
120
### WARNING
139
121
* WARNING!!:* cypress-on-rails can execute arbitrary ruby code
140
122
Please use with extra caution if starting your local server on 0.0.0.0 or running the gem on a hosted server
@@ -144,8 +126,8 @@ Please use with extra caution if starting your local server on 0.0.0.0 or runnin
144
126
Getting started on your local environment
145
127
146
128
``` shell
147
- # start rails
148
- CYPRESS=1 bin/rails server -p 5017
129
+ # start rails with test environment
130
+ CYPRESS=1 RAILS_ENV=test bin/rails server -p 5017
149
131
150
132
# in separate window start cypress
151
133
yarn cypress open --project ./e2e
You can’t perform that action at this time.
0 commit comments