Rails (3?): Skip Test

Posted by admin on Jun 14, 2010 in Rails, Ruby, Testing |

In updating an existing Rails app to run under Rails 3 (beta 4), I realized you could indicate that a certain test case should be skipped. ¬†Literally, just add “skip” inside of the test (I added it to the top of one of mine as it was actually a work in progress) followed by an optional message. ¬†For example:

test "should take the warp core offline" do
  skip
  warp_core.dismount
end

Very useful.

Comments are closed.

Copyright © 2017 Standalone Code LLC All rights reserved. Theme by Laptop Geek.