rspec
Running rspec from rails application code
I\'ve got a situation where I need to validate some regular expressions. So, during my application run, I may want to test that a particular regex:[详细]
2023-04-11 10:51 分类:问答RSpec test with factory_girl and will_paginate for associated objects
I am having problems with writing a test in rspec for will_paginate. The problem is that I have a model with an Owner that can have many pets. This leads to a factories.rb file that looks like this:[详细]
2023-04-11 07:18 分类:问答Rspec testing for html entities in page content
I\'m writing a request spec and would like to test for the presence of the string \"Reports » Aging Reports\". I get an error (invalid multibytechar) if I put in the character in my matcher expressio[详细]
2023-04-11 06:44 分类:问答NoMethodError: undefined method `belong_to' for #<RSpec::Core::ExampleGroup::Nested_4:0xa05d2a0>
So this is kind of baffling me as I can\'t quite figure out why it\'s happening. This only happens on my laptop (Ubuntu 11.04), and not elsewhere.I just seem to have something weird with the setup on[详细]
2023-04-11 01:19 分类:问答Speeding up rspec controllers test: using before all fails?
I have a simple controller test, containing a.o. the following code: context \"POST :create\" do before (:each) do[详细]
2023-04-11 00:23 分类:问答Rails 3.1, RSpec - failing but page loads fine
I am writing some specs and the following is failing but the page /menus/1 is loading fine in a browser. This is a port of a php app and is first time I\'ve used RSpec. Any thoughts as to why it might[详细]
2023-04-10 23:58 分类:问答Rspec testing in ruby mine always returns false
I have a class User as follows class User < ActiveRecord::Base has_one :session has_and_belongs_to_many :posts[详细]
2023-04-10 15:20 分类:问答Testing jquery dialog with capybara-webkit
I want to test an interaction where the user clicks a li开发者_如何学编程nk and a jquery dialog (http://jqueryui.com/demos/dialog/) pops up.[详细]
2023-04-10 10:00 分类:问答Rails/RSpec: 'get' to a different controller
I have the following in my Rails 3 controllers/application.rb (which I\'m trying to write a spec for):[详细]
2023-04-10 04:28 分类:问答Rspec/Spork: Disabling spork for one run
I have --drb set in my .rspec file, which means spork runs by default. If, however, I want to run through tests once without spork, I either have to modify my 开发者_如何学Python.rspec, or stop spork[详细]
2023-04-10 04:24 分类:问答