rspec tag

31 questions


2 answers
284 views
0
I want to use Rspec expect method around

I am writing a test code using Rspec, but I want to define it somewhere and define it for each it like a method.I'm in trouble because I can't find the same article as I thought.I wonder how dry they ...

1 years ago

1 answers
354 views
0
require'rspec/core/rake_task' I don't know what file I'm loading

In order for rake to run RSpec automatically, it was necessary to load require'rspec/core/rake_task', but when I went to see rspec's github, there was no such path.I'd like to solve this problem becau...

1 years ago

1 answers
364 views
0
RSpec Cannot Resolve 'Failed to find Chrome binary.' Error

I was creating a test using RSpec during portfolio creation, but I got the following error:Development Environment:Ruby 2.5.1Rails 5.2.4.3Mac OS 1.1) Failure/Error: visit login_path Webdrivers::Brows...


1 answers
363 views
0
Rspec Does Not Test Confirm Dialog

I am currently creating a test under spec/system as follows, but it does not work.Only the following articles are up to date on Rspec confirm.I don't know how to solve it.I would appreciate it if you ...


2 answers
70 views
0
Rails5 Fails/Error When Running Rspec

I am creating a task management application called taskleaf in accordance with the reference book rails5 Quick Learning Exercise Guide, but I have a failure/error error when running Rspec, so I would ...

1 years ago

2 answers
98 views
0
How to Test the Private Method of the Model

modelclass test  def initialize(val1,val2)    validate(val1,val2)  end  private   def validate(val1,val2)    raise xxxx errorless val1.presnet?    raise yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy  ...

1 years ago

1 answers
115 views
0
I would like to test one-to-many associations with Rspec.

I'm tripping on the Rspec test.How do I write to test the association...There are two things I don't understand.1. I'm not sure how to associate with factorygirl in a one-to-many association (this tim...

1 years ago

1 answers
65 views
0
I want to test the Ransack part in Rails Rspec, but I get an error saying undefined method `[]'for nil: NilClass

This is a question about Rspec.I'm writing the code for the Rspec test to see if Ransack is working properly, but in the simulation section of the search execution, NoMethodError:undefined method `[]'...

1 years ago

1 answers
87 views
0
Using capybara to Validate Redirect Destination Pages

I use capybara to write feature specifications.class UserController <ApplicationController def index redirect_to new_user_path end def new # something endendIf there is a controller called feature ...

1 years ago

1 answers
105 views
0
What are the best practices for creating test data for medium-sized applications?

Less than 200 Models100 Controllers I'm creating an application that's about .The test tools are FactoryGirl and RSpec.I create test data with FactoryGirl every time, but the relationship is quite lar...

1 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.