rspec
Rspec false positive because failure exception is rescued in code being tested
I have an rspec test that I expect to fail, but it is passing because the code that it is testing rescues the exception that rspec raises. Here\'s an example of the situation:[详细]
2023-04-05 07:45 分类:问答RSpec seems to break when the route 'match' statement has a subdirectory (or nested route) listed
it \"should match login for existing account\" do { :get =>开发者_JS百科 \'http://www.\' + @business.subdomain + \'.lvh.me:3000/login\' }.should route_to({:controller => \"go\", :action => \"[详细]
2023-04-05 04:11 分类:问答rails 3.1 assets pipeline + acceptance test
we have a rather extensive acceptance test suite, running on our CI server triggered by a Github push hook. i\'d like to add a feature or spec to basically test wether rake assets:precompile runs smoo[详细]
2023-04-04 23:48 分类:问答How to generate fixtures for use in Jasmine tests
I\'m writing a Rails plugin/gem, that is basically some helpers (FormHelpers, FormTagHelpers), and some asso开发者_运维百科ciated Javascript to add behavior.[详细]
2023-04-04 22:42 分类:问答Disable SQL logging in terminal during testing with Rails 3.1? (RSPEC/Cucumber)
I just upg开发者_如何学Goraded my app to rails 3.1 and now whenever I run tests I get a ton of SQL output in my terminal.[详细]
2023-04-04 20:40 分类:问答Can I use Rspec and respond_with in Rails 3.1?
My specs passed until I changed to respond_with in my generated controller. I ran across this issue on github, but it was closed some time ago. I\'m stumped as to what to do next. How can I fix this p[详细]
2023-04-04 18:45 分类:问答Prevent database rollback in specs in Ruby on Rails?
When running RSpec tests in Ruby on Rails 2.3 with ActiveRecord, the database gets rolled back to the state after a before :all block after each example (it block).[详细]
2023-04-04 15:48 分类:问答RSpec testing a series of actions
I have a complex transaction process I want to test using RSpec. I would like to have some checking after each step. I only know how to test them in separate actions. So in each step, I have to add ac[详细]
2023-04-04 15:03 分类:问答Test to validate ruby subclasses implement strategy method
I\'m implementing a simple strategy pattern (for the first time in ruby) and I want to write a test to make sure that every subclass implements the crucial strategy method. So, I have something like t[详细]
2023-04-04 11:20 分类:问答RSPEC Test Passing that should fail
I\'m using rspec, rails, guard and sorcery for my authentication and testing. I have a test that is testing the length of an email. I want to reject emails that are too long. Here is the test I wrote[详细]
2023-04-04 10:44 分类:问答