Best webdrive for rails rspec capybara4/28/2023 For the purposes of this “hello world” exercise, that’s okay. You also may well not understand where the RSpec stops and the Capybara starts. You may find some of the RSpec or Capybara syntax confusing or indecipherable. The tools we’ll be usingįor this exercise we’ll be using RSpec, anecdotally the most popular of the Rails testing frameworks, and Capybara, a library that enables browser interaction (clicking buttons, filling out forms, etc.) using Ruby. The ins and outs of writing tests get complicated quick enough that I think it’s valuable to start with an example that’s almost absurdly simple. But the goal is not to write a realistic test but to provide you with a mental “Lego brick” that you can combine with other mental Lego bricks later. I would probably never write a test in real life that just verifies the content of a static page. The goal here is just to walk through the motions of writing a test.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |