testunit
With Test::Unit, how can I run a bit of code before all tests (but not each test)?
In my test app, which uses test::unit, I need to start by pulling a bunch of data from various sources. I\'d like to only do开发者_开发百科 this once - the data is only read, not written, and doesn\'t[详细]
2023-04-12 12:34 分类:问答can't get test unit startup to work in ruby 1.9.2
I am using Ruby 1.9.2 (ruby -v yields :ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]), and I am trying to get this to work:[详细]
2023-04-11 00:11 分类:问答ArgumentError: assertion message must be String or Proc using assert_select
I\'m writing a controller test for a rails 3.1 app using testunit 2.4.0. I want to assert that a 开发者_高级运维certain heading does not appear on the page.[详细]
2023-04-09 23:56 分类:问答Ruby: How to pass options to test::unit in 1.9.3
I want to run a test file: # xxx.rb require \'test/unit\'; class XTest < Test::Unit::TestCase; def test_xxx; end; end[详细]
2023-04-09 03:49 分类:问答testing a rails helper that uses cookies
I have a method in app/helpers/application_helper.rb that calls cookies. Which is totally allowed; this method is working wonderfully in my dev environment and knows what I mean when I say cookies.[详细]
2023-04-09 01:40 分类:问答How can I speed up Rails unit tests involving image upload/resizing?
My app does a lot with images. I use paperclip to attach them to models. I have tons of tests (Test::Unit) that involve creating images, these run pretty slowly.[详细]
2023-04-08 00:12 分类:问答How to build HTML reports from Test::Unit?
I am using Selenium Webdriver + Test::Unit test runner for Ruby. Ultimately, I want to output the testing results to HTML page. Could you advise me how to do it?[详细]
2023-04-05 20:20 分类:问答Moching rails association methods
Here is my helper method which I want to test. def posts_correlation(name) if name.present? author = User.find_by_name(name)[详细]
2023-04-02 20:29 分类:问答How to use assert_select to test for presence of a given link?
My page should contain开发者_C百科 a link that looks like <a href=\"/desired_path/1\">Click to go</a>.[详细]
2023-03-29 07:49 分类:问答running Rails unit tests without loading the environment or using a database
As something of an academic exercise, I thought I\'d try to get my unit tests running without loading the Rails env (or hitting the database开发者_开发问答).[详细]
2023-03-28 16:26 分类:问答