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 and <1 p>

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:

  group: development, testing gem 'rspec' gem 'rspec-rails' gem 'capebara' gem 'factory alleys' end   

spec / features / people_spec.rb:

  class 'spec_helper' requires PeopleSpec & lt;   

Imagery / "People" spec_helper:

  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   

route:

  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>   

add gem 'launchy' and after that you Save_and_open_page after going to to see how the provided page looks.

Add the code to topic {page} to fix it.

If you can say something to 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   

or if you have many tests for page , you can type them in a little bit: / p>

  This must be (_content) ('foo')}   

but you must specify the subject for before: < / p>

  topics {page}    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -