ruby on rails - Rspec - obvious test is failing, how to troubleshoot? -
I have a very simple app that I am trying to test with RSPC. I find it difficult to determine whether my configuration is a problem, or if this code is /people/index.html the first line of .arb error: < Ex> > code> "Completely awesome page" text in "Index" is expected. /spec/features/people_spec.rb:19:in 'Block (level 3) & lt; class: PeopleSpec & gt; test gems: spec / features / people_spec.rb: Imagery / "People" spec_helper: route: add Add the code to If you can say something to or if you have many tests for but you must specify the subject for and <1 p>
group: development, testing gem 'rspec' gem 'rspec-rails' gem 'capebara' gem 'factory alleys' end
class 'spec_helper' requires PeopleSpec & lt;
ENV ["RAILS_ENV"] == File 'test' Expand_path ("../../config / environment", __FILE__) requires 'rspec / rails' Requires 'minimum / autoron' for 'rspc / autoron' 'capebara / rails' Requires 'Capibara / RSPC' Dir [Rails.root.join ("spec / support / ** / * .rb")]. Each {| F | Required f} ActiveRecord :: Migration.maintain_test_schema! RSpec.configure do | Config | config.use_transactional_fixtures = true config.infer_base_class_for_anonymous_controllers = false config.order = "random" config.include Capybara :: DSL termination
people_path People / people (.: Format) People # Index Post / People People.: Format) People # Create new_person_path / Public / New (.: Format) People # New Edit_Environment_text / People / ED / Edit (. # Edit person_path GET /people/:id(.:format) People #Show PATCH /people/:id(.:format) People #Update PUT /people/:id(.:format) People #Update DELETE / people / : id (.: format) People # destroyed < / code>
gem 'launchy' and after that you
Save_and_open_page after going to
to see how the provided page looks.
topic {page} to fix it.
this It is not in your test that you can use
should to do this
page to do this (
page is not the only one Which you can test.) There are also more, such as
feedback or even Lambdas):
This is a "some details" page. Should you have content ('foo') termination
page , you can type them in a little bit: / p>
This must be (_content) ('foo')}
before: < / p>
topics {page}
Comments
Post a Comment