Permalink
Browse files

Setup rspec, guard, etc

  • Loading branch information...
1 parent 19f5aa2 commit 73f2a47b79d5b650223f3328ab54695654e57ebe @justincampbell justincampbell committed Feb 29, 2012
Showing with 43 additions and 6 deletions.
  1. +2 −0 .rspec
  2. +9 −2 Gemfile
  3. +6 −0 Guardfile
  4. +13 −2 Rakefile
  5. +5 −2 capistrano_notifier.gemspec
  6. +6 −0 spec/capistrano_notifier_spec.rb
  7. +2 −0 spec/spec_helper.rb
View
2 .rspec
@@ -0,0 +1,2 @@
+--color
+--format progress
View
11 Gemfile
@@ -1,4 +1,11 @@
-source 'https://rubygems.org'
+source :rubygems
-# Specify your gem's dependencies in capistrano_notifier.gemspec
gemspec
+
+group :development, :test do
+ group :darwin do
+ gem 'rb-fsevent'
+ gem 'growl'
+ end
+end
+
View
@@ -0,0 +1,6 @@
+guard 'rspec', :version => 2 do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
+end
+
View
@@ -1,2 +1,13 @@
-#!/usr/bin/env rake
-require "bundler/gem_tasks"
+begin
+ require 'bundler/gem_tasks'
+rescue LoadError
+ puts "Ruby >= 1.9 required for build tasks"
+end
+
+require 'rspec/core/rake_task'
+
+task :default => :spec
+
+desc "Run the test suite"
+RSpec::Core::RakeTask.new
+
@@ -10,8 +10,11 @@ Gem::Specification.new do |gem|
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
gem.files = `git ls-files`.split("\n")
- gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
- gem.name = "capistrano_notifier"
+ gem.test_files = `git ls-files -- spec/*`.split("\n")
+ gem.name = "capistrano-notifier"
gem.require_paths = ["lib"]
gem.version = CapistranoNotifier::VERSION
+
+ gem.add_development_dependency 'guard-rspec'
+ gem.add_development_dependency 'rspec'
end
@@ -0,0 +1,6 @@
+require "spec_helper"
+
+describe CapistranoNotifier do
+ it { should be_a Module }
+end
+
View
@@ -0,0 +1,2 @@
+require "capistrano_notifier"
+

0 comments on commit 73f2a47

Please sign in to comment.