rspec tag

31 questions


2 answers
317 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
372 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...

2 years ago

1 answers
416 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
384 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
90 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 ...

2 years ago

2 answers
119 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  ...

2 years ago

1 answers
147 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...

2 years ago

1 answers
84 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 `[]'...

2 years ago

1 answers
120 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 ...

2 years ago

1 answers
135 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...

2 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.