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/Rakefile b/Rakefile index f57ae68..1e00cec 100644 --- a/Rakefile +++ b/Rakefile @@ -1,2 +1,5 @@ #!/usr/bin/env rake require "bundler/gem_tasks" + +require 'rspec/core/rake_task' +RSpec::Core::RakeTask.new('spec') diff --git a/easy-deployment.gemspec b/easy-deployment.gemspec index f9811d2..869bcbd 100644 --- a/easy-deployment.gemspec +++ b/easy-deployment.gemspec @@ -22,4 +22,5 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency 'capistrano_colors' gem.add_development_dependency 'bundler' + gem.add_development_dependency 'rspec', '~> 2.8' end diff --git a/spec/easy_deployment_spec.rb b/spec/easy_deployment_spec.rb new file mode 100644 index 0000000..7f8fa0e --- /dev/null +++ b/spec/easy_deployment_spec.rb @@ -0,0 +1,7 @@ +require 'spec_helper.rb' + +describe Easy::Deployment do + it "has a version number" do + Easy::Deployment::VERSION.should be_present + end +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..3ee85fc --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,15 @@ +# This file was generated by the `rspec --init` command. Conventionally, all +# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. +# Require this file using `require "spec_helper.rb"` to ensure that it is only +# loaded once. +# +# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration + +require 'rubygems' +require 'bundler' + +require 'easy-deployment' + +RSpec.configure do |config| + config.mock_with :rspec +end diff --git a/test/helper.rb b/test/helper.rb deleted file mode 100644 index f896265..0000000 --- a/test/helper.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'rubygems' -require 'bundler' -begin - Bundler.setup(:default, :development) -rescue Bundler::BundlerError => e - $stderr.puts e.message - $stderr.puts "Run `bundle install` to install missing gems" - exit e.status_code -end -require 'minitest/unit' - -$LOAD_PATH.unshift(File.dirname(__FILE__)) -$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) -require 'easy-deployment' - -class MiniTest::Unit::TestCase -end - -MiniTest::Unit.autorun diff --git a/test/test_easy_deployment.rb b/test/test_easy_deployment.rb deleted file mode 100644 index 4f150da..0000000 --- a/test/test_easy_deployment.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'helper' - -class Easy::TestDeployment < MiniTest::Unit::TestCase - def test_something_for_real - flunk "hey buddy, you should probably rename this file and start testing for real" - end -end