Permalink
Browse files

added flakey_spec

  • Loading branch information...
1 parent bb99219 commit 341bb36b6f66fb14c19d72aa83981d616bd5ec50 Jared Grippe committed with Dec 29, 2011
Showing with 17 additions and 0 deletions.
  1. +10 −0 spec/flakey_spec.rb
  2. +7 −0 spec/spec_helper.rb
View
@@ -0,0 +1,10 @@
+require 'spec_helper'
+
+describe 'Flakey Spec' do
+
+ it "should fail 60 percent of the time" do
+ ExampleHobsonProject.sleep_and_log_for 10
+ 60.percent_of_the_time{ raise "something mysterious went wrong D=" }
+ end
+
+end
View
@@ -1 +1,8 @@
require 'example_hobson_project'
+
+
+class Fixnum
+ def percent_of_the_time
+ yield if rand(100) <= self
+ end
+end

0 comments on commit 341bb36

Please sign in to comment.