rspec-rails
How can I specify https protocol in routing spec with rspec?
In my routes file I have: resources :subscription, :only => [:show], :constraints => {:protocol =>开发者_如何学JAVA \"https\"}[详细]
2023-04-02 12:07 分类:问答test a file upload using rspec - rails
I want to test a file upload in rails, but am not sure how to do this. Here is the controller code: def uploadLicense[详细]
2023-04-02 01:54 分类:问答Rails validation exclusion with routes
I want to test that a user is invalid if the username equals one of the first routing blocks. I spec it in rspec at the moment this way:[详细]
2023-03-31 20:49 分类:问答rspec render_views ignores layouts? want to test static cached page does not display flash message
I开发者_如何学Python\'m trying to test that \"static\" pages (they\'re ERB, but get cached), generated through rails, don\'t render any stray flash notices left over by the authentication system (Devi[详细]
2023-03-31 13:13 分类:问答autotest does not work with rspec shared examples
My tests look like this: <<< spec/models/user_shared.rb shared_examples_for \"a user\" do end <<< spec/models/worker_spec.rb[详细]
2023-03-31 07:57 分类:问答How can I alleviate timing/AJAX woes using Capybara/Capybara Webkit/RSpec click_button and page.select?
For the sake of simplicity, I\'ve left out most of my test and only included the offending code. It is:[详细]
2023-03-30 23:37 分类:问答Factory-girl: 'association' named column overlap with Factory method named 'association'
I have the following Factory definition. Factory.define :status do |f| end Factory.define :my_status , :parent => :status do |f|[详细]
2023-03-30 15:26 分类:问答Rspec Ruby on Rails controller question
I\'m currently using ruby 1.9.2 and rails 3 and I\'m in the middle of rspec testing.Basically, I have a function that is called by a before filter in the application controller such that it obviously[详细]
2023-03-30 03:48 分类:问答What is the best practice for writing RSpec tests/examples? Write examples to test the positive/affirmative, the negative, or both?
Fairly new to BDD and RSpec, and I\'m really curious as to what people typically do when writing their RSpec tests/examples, specifically as it relates to positive and negative tests of the same thing[详细]
2023-03-27 20:47 分类:问答Factory Girl / Capybara deleting records from database mid-test?
Working with RSpec & Capybara, I\'m getting an interesting test failure mode which goes away with a few subtle rearrangements of lines in the test case...stuff that shouldn\'t matter.[详细]
2023-03-27 07:15 分类:问答