Permalink
Browse files

Add testing infrastructure

  • Loading branch information...
Chris Griego and Morgan Nelson Development
Chris Griego and Morgan Nelson authored and Development committed May 14, 2012
1 parent 8bd7ad4 commit 6b2b9b6fc5ee22c00d6606c72ef86e15858415cd
Showing with 31 additions and 0 deletions.
  1. +2 −0 .rspec
  2. +7 −0 Gemfile
  3. +11 −0 Guardfile
  4. +10 −0 Rakefile
  5. +1 −0 spec/spec_helper.rb
View
2 .rspec
@@ -0,0 +1,2 @@
--color
--format nested
View
@@ -2,3 +2,10 @@ source "https://rubygems.org"
gem "chef", "~> 0.10.8"
gem "foodcritic"
gem "growl"
gem "guard"
gem "guard-bundler"
gem "guard-rspec"
gem "rake"
gem "rb-fsevent"
gem "rspec"
View
@@ -0,0 +1,11 @@
guard "bundler" do
watch("Gemfile")
end
guard "rspec", :cli => "--color --format nested", :version => 2 do
watch(%r{^libraries/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^recipes/(.+)\.rb$}) { |m| "spec/#{m[1]}_recipe_spec.rb" }
watch(%r{^spec/.+_spec\.rb$})
watch("spec/spec_helper.rb") { "spec" }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
end
View
@@ -0,0 +1,10 @@
require "bundler/setup"
require "rspec/core/rake_task"
task :default => [:spec, :foodcritic]
RSpec::Core::RakeTask.new
task :foodcritic do
sh %{foodcritic . --epic-fail any}
end
View
@@ -0,0 +1 @@
$:.push File.expand_path(File.join("..", "..", "libraries"), __FILE__)

0 comments on commit 6b2b9b6

Please sign in to comment.