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
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:
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.
I want to run a test file: # xxx.rb require \'test/unit\'; class XTest < Test::Unit::TestCase; def test_xxx; end; end
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.
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.
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?
Here is my helper method which I want to test. def posts_correlation(name) if name.present? author = User.find_by_name(name)
My page should contain开发者_C百科 a link that looks like <a href=\"/desired_path/1\">Click to go</a>.
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开发者_开发问答).