Currently got this error message after executing my RSpec tests: ActionController::RedirectBackError: No HTTP_REFERER was set in the request to this action, so redirect_to :back could not be called successfully. If this is a test, make sure to specify request.env[“HTTP_REFERER”]. The error message and Stackoverflow tells you to set request.env[“HTTP_REFERER”]. I did that: request.env[“HTTP_REFERER”] = “/signin”Continue reading “HTTP_REFERER for RSpec is missing”
Tag Archives: RSpec
undefined method `visit’ for RSpec with Capybara
I just started to write an acceptance test with capybara. I followed the code example on the GitHub Page and I got this odd error: Failure/Error: visit ‘http://127.0.0.1:3000/signin’ NoMethodError: undefined method `visit’ for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x007fda48e0f680> I placed my test in “spec/requests”. After some research I found out that the new Capybara GEM expects the test to beContinue reading “undefined method `visit’ for RSpec with Capybara”
Integration Tests with RSpec
RSpec is a Test Framework for Ruby! And RSpec is just awesome! It is the best Test Framework I know. Add this 2 lines to your Gemfile to the test group and the development group. gem ‘rspec-rails’, ‘2.8.0’ gem ‘webrat’, ‘0.7.3’ Webrat is a browser simulator. With RSpec and Webrat you can write integration tests and test the UI ofContinue reading “Integration Tests with RSpec”
RSpeck before after
RSpec is a Test Framework for Ruby! And RSpec is just awesome! It is the best Test Framework I know. Add this 2 lines to your Gemfile to the test group and the development group. gem ‘rspec-rails’, ‘2.8.0’ gem ‘webrat’, ‘0.7.3’ Webrat is a browser simulator. With RSpec and Webrat you can write integration tests and test the UI ofContinue reading “RSpeck before after”
RSpec
RSpec is a Test Framework for Ruby! And RSpec is just awesome! It is the best Test Framework I know. Add this 2 lines to your Gemfile to the test group and the development group. gem ‘rspec-rails’, ‘2.8.0’ gem ‘webrat’, ‘0.7.3’ Webrat is browser simulator. With RSpec and Webrat you can write integration tests andContinue reading “RSpec”