Basic rspec Ruby on Rails model specs

  Рет қаралды 17,910

CJ Avilla (cjav_dev)

CJ Avilla (cjav_dev)

Күн бұрын

Пікірлер: 15
@tomdringer985
@tomdringer985 Жыл бұрын
Really enjoying these testing videos. ?You make it all crystal clear. Thank you!
@martinkarkovich3037
@martinkarkovich3037 3 жыл бұрын
very detailed explanations!
@lucydelaluna
@lucydelaluna Жыл бұрын
Great tutorial! Thank you so much.
@viveknaik6798
@viveknaik6798 2 жыл бұрын
Extremely well done! I watch with 75% speed.
@CHACHANUS
@CHACHANUS 3 жыл бұрын
great video !!!! in the next video for complex tests can you show examples how i can refactor long tests , and , if is possible create a function or method when i have to build factories with same format, example form4=build.... and these lines are repeated along my tests? . would be nice if teach us some about code coverage with simplecov... thanks in advance,,, channels like yours keep Rails alive.
@john.dough.
@john.dough. Жыл бұрын
awesome! Thanks for sharing
@farsiteguide2735
@farsiteguide2735 Жыл бұрын
Tnx for tutorials, but where can I find form4tracker build videos?
@mutebiugofficial8827
@mutebiugofficial8827 Жыл бұрын
How can I test for regular expressions with rspec and shoulda matchers.
@judisjeevan4908
@judisjeevan4908 2 жыл бұрын
Hi CJ. Which Vim theme are you using? Also which terminal? Whether it is iTerm or Terminal in mac?
@cjav_dev
@cjav_dev 2 жыл бұрын
One dark is the theme in iTerm. I also set some custom colors on iTerm
@dbsmith3974
@dbsmith3974 3 жыл бұрын
is the schema information automatically added to your model file or do you manually add that information?
@cjav_dev
@cjav_dev 3 жыл бұрын
When you create the model and a migration, and run the migrations, the schema is automatically updated. This is a solid question and something I totally glossed over. Will try to cover this better in the future.
@dbsmith3974
@dbsmith3974 3 жыл бұрын
@@cjav_dev Im familiar with the schema being created, but Ive never come across the table details in the model like you have here. I even ran a rails g rspec:mode dummy name born_at:integer to see if it was something I may have missed but nothing was there
@cjav_dev
@cjav_dev 3 жыл бұрын
oh! so if you run `rails g rspec:model Dummy` that'll create the spec file and the factory, but both will be empty, even if the schema has columns. If you run `rails g rspec:model Dummy born_at:integer` that should create the same spec file, but the factory should have a new born_at thing setup for you. In practice, when you generate new models like: `rails g model Dummy born_at:datetime` that'll generate the model, migration, spec, and it'll also add born_at to your factory, which is super handy :)
@kang_marvin
@kang_marvin 2 жыл бұрын
It's a gem called Annotate.
Job specs for rspec with Ruby on Rails
11:46
CJ Avilla (cjav_dev)
Рет қаралды 3,4 М.
Install Factory Bot with Ruby on Rails
17:55
CJ Avilla (cjav_dev)
Рет қаралды 11 М.
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 86 МЛН
RailsConf 2023 - Keynote by Eileen Uchitelle
44:25
Ruby Central
Рет қаралды 4,9 М.
Rspec request specs for an API Controller with Rails
13:32
CJ Avilla (cjav_dev)
Рет қаралды 10 М.
Learn Active Record associations with Starwars
24:20
CJ Avilla (cjav_dev)
Рет қаралды 7 М.
Setup Rspec with Ruby on Rails
14:07
CJ Avilla (cjav_dev)
Рет қаралды 21 М.
How to RSpec - Fairly comprehensive starter guide to RSpec
2:08:55
Unit Testing Rails Models (Test Driven RSpec, Ep 04)
27:30
Brett Codes
Рет қаралды 10 М.
Understanding Controler and View
24:36
PeopleCanCode
Рет қаралды 10 М.