Permalink
Browse files

Adding coverage and fix a typo

  • Loading branch information...
1 parent b4da25b commit 2e694b32aea8244ff683d92827ae6f3b617d654d @rogercampos rogercampos committed May 4, 2011
Showing with 12 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +7 −0 Rakefile
  3. +1 −1 app/models/windjammer/product.rb
  4. +1 −0 spec/spec_helper.rb
  5. +2 −0 windjammer.gemspec
View
@@ -9,3 +9,4 @@ test_app/db/*.sqlite3
test_app/log/*.log
test_app/tmp/**/*
+coverage
View
@@ -6,3 +6,10 @@ require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
+
+desc "Run all specs with rcov"
+RSpec::Core::RakeTask.new("spec:coverage") do |t|
+ t.rcov = true
+ t.rcov_opts = %w{--rails --include views -Ispec --exclude gems\/,spec\/,features\/,seeds\/}
+ t.rspec_opts = ["-c"]
+end
@@ -70,7 +70,7 @@ def numeric_inputs
end
def get_calculation_traits_with_format
- res = traits_to_calculate.map do
+ res = traits_to_calculate.map do |x|
[x.name, x.format]
end
res << ["base_price", "string"]
View
@@ -3,6 +3,7 @@
require File.expand_path("../../test_app/config/environment", __FILE__)
require 'rspec/rails'
+require 'shoulda-matchers'
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
View
@@ -30,4 +30,6 @@ Gem::Specification.new do |s|
s.add_development_dependency "rspec-rails", "~> 2.5"
s.add_development_dependency "factory_girl_rails"
s.add_development_dependency "autotest"
+ s.add_development_dependency "rcov"
+ s.add_development_dependency "shoulda-matchers"
end

0 comments on commit 2e694b3

Please sign in to comment.