Skip to content

Commit

Permalink
Setup rspec, guard, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
justincampbell committed Feb 29, 2012
1 parent 19f5aa2 commit 73f2a47
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--format progress
11 changes: 9 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -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

6 changes: 6 additions & 0 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -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

15 changes: 13 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -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

7 changes: 5 additions & 2 deletions capistrano_notifier.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions spec/capistrano_notifier_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
require "spec_helper"

describe CapistranoNotifier do
it { should be_a Module }
end

2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require "capistrano_notifier"

0 comments on commit 73f2a47

Please sign in to comment.