31 questions
Currently using rspec to study test code.So I am using factory_bot, but I get an error in the build.KeyError: Factory not registered:Here is the error statement.https://masawada.hatenablog.jp/entry/20...
I created the test code below, but if I put the code expect under get:index params, I get an error if there is no value.It's strange that other test codes (without a mock) had code that you wanted to ...
spec/factories/projects.rbI would like to set the user.rb to create 5 projects each time a user is created, but an error is printed and it does not work well.FactoryBot.definedo factory —Project do se...
We are currently creating a portfolio (Rails-api, React) and the deployment to production heroku has been completed.After running the previous Rspec and confirming that there was no problem, I was goi...
Is the email address that I set using Faker in RSpec real?I don't have it yet, but when I started creating a feature that would send mail to users, I think it would be a problem if the email was unint...
Rails 7.0DockerI am currently studying Rspec in the Introduction to Rails Testing with Everyday Rails Rspec We are testing using requestspec to send Post to make sure DB has one more target data, but ...
While I was studying, I found something I didn't understand.Why should I review the instance variableWhen I read the article above, it said this.Let is called at the required time, but before instance...
You want to create a set of 3 users and their associated data as follows:before do user1 = create(:user) create(:profile, user_id:user1.id) create(:image,user_id:user1.id) create(:birthday,user_id:use...
environment:Rails: 5.1.5Ruby: 2.5.0capybara:2.18.0rspec-rails: 3.7.2selenium-webdriver: 3.10.0 I'm a beginner at Docker.We are currently creating a development environment with docker-compose as follo...
If you test it on your browser, it will succeed, but if you test it on capybara, it will fail.If you submit it on the edit screen as shown below, update it.def update # When the post button is pressed...
« | - 2 - | » |
© 2024 OneMinuteCode. All rights reserved.