diff --git a/.rspec b/.rspec new file mode 100644 index 0000000..5f16476 --- /dev/null +++ b/.rspec @@ -0,0 +1,2 @@ +--color +--format progress diff --git a/Gemfile b/Gemfile index 0573330..037463a 100644 --- a/Gemfile +++ b/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 + diff --git a/Guardfile b/Guardfile new file mode 100644 index 0000000..a4b3943 --- /dev/null +++ b/Guardfile @@ -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 + diff --git a/Rakefile b/Rakefile index f57ae68..66ce6c3 100644 --- a/Rakefile +++ b/Rakefile @@ -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 + diff --git a/capistrano_notifier.gemspec b/capistrano_notifier.gemspec index b87528b..313d6bc 100644 --- a/capistrano_notifier.gemspec +++ b/capistrano_notifier.gemspec @@ -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 diff --git a/spec/capistrano_notifier_spec.rb b/spec/capistrano_notifier_spec.rb new file mode 100644 index 0000000..e349d9e --- /dev/null +++ b/spec/capistrano_notifier_spec.rb @@ -0,0 +1,6 @@ +require "spec_helper" + +describe CapistranoNotifier do + it { should be_a Module } +end + diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..839146f --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,2 @@ +require "capistrano_notifier" +