#testing
7 posts tagged testing. Clear filter
-
Change the Default Controller Name in Rails Functional Tests
Rails will infer the controller you want to test from the class name of the test case. For example... class PeopleControllerTest < ActionController::TestCase end will test the...
-
Testing current_user and Sessions with Sinatra and Rack Test
Assume you have your standard Sinatra application. app.rb require 'sinatra' configure do enable :sessions end get '/' do if session[:userid] "OK" else raise "NOT OK!" end end To test this you need...
-
How To Use Rake to Run Your Test Suite with Sinatra
If you're using Sinatra and you want to use rake to run your test suite, you will need to create a Rakefile and put this in it. This assumes your test suite is under the 'test/' directory and the...
-
Color Output with Test:Unit, AutoTest and Ruby 1.9
If you are testing using Test:Unit (rather than RSpec) and you're using Ruby 1.9. colorized output of your tests using Autotest will not be immediately available. Since, 1.9 comes with mini test...
-
Manage Fixtures with Yaml DB Plugin for Rails
Get the plugin like so... This command will dump your data And load it back Beautiful :) More info here http://blog.heroku.com/archives/2007/11/23/yamldb\for\databaseindependent\data\dumps/ and...
-
paypal ipn simulator
If you use the Paypal sandbox you'll notice that there is an IPN Simulator test tool. You must be logged to use it. This tool lets you test an IPN handler script for your application. If your...
-
rails fixtures: using the right timestamp
Fixtures in Rails allow you to quickly and easily populate a database with sample data. They are great when testing your app and you need to test against a condition that will rely on a certain...