Permalink
Browse files

Added SimpleCov to tests.

  • Loading branch information...
mauricioszabo committed Nov 25, 2011
1 parent 71efaab commit ed902ddff864f2459911a11c8a81e0c0cb4bdda6
Showing with 13 additions and 3 deletions.
  1. +3 −3 rspec.watchr
  2. +10 −0 spec/helper.rb
View
@@ -1,10 +1,10 @@
-watch('(.*).rb') { |x| run_spec "spec/#{x[1]}_spec.rb" }
+watch('lib/(.*).rb') { |x| run_spec "spec/#{x[1]}_spec.rb" }
watch('spec/.*_spec.rb') { |x| run_spec x[0] }
def run_spec(spec)
puts "Running spec: #{spec}"
- if system "spec #{spec}"
- send_notification :all unless system "spec spec/"
+ if system "rspec #{spec}"
+ send_notification :all unless system "rspec spec/"
else
send_notification
end
View
@@ -1,4 +1,14 @@
+require 'simplecov'
+SimpleCov.start do
+ add_filter "spec"
+end
+
require "ar_sdl"
require_relative "mock_screen"
require_relative "objects_matcher"
+class Player
+ def surface
+ @animations[@current_animation]
+ end
+end

0 comments on commit ed902dd

Please sign in to comment.