Permalink
Browse files

Merge pull request #3 from shaiguitar/master

Use rspec as default rake task
  • Loading branch information...
2 parents 0fadfce + 6a5d352 commit f16f94f6cdde54ad2510b495811e57cc5f002bee @mdp committed May 19, 2012
Showing with 12 additions and 10 deletions.
  1. +0 −2 Gemfile
  2. +5 −7 Rakefile
  3. +4 −0 rotp.gemspec
  4. +1 −1 spec/base_spec.rb
  5. +2 −0 spec/spec_helper.rb
View
@@ -1,4 +1,2 @@
source "http://rubygems.org"
gemspec
-gem 'rspec'
-gem 'timecop'
View
@@ -1,12 +1,10 @@
require 'bundler'
Bundler::GemHelper.install_tasks
-require 'rake/testtask'
+require "rspec/core/rake_task"
-require 'rake/testtask'
-Rake::TestTask.new(:test) do |test|
- test.libs << 'lib' << 'test' << '.'
- test.pattern = 'test/**/test_*.rb'
- test.verbose = true
+RSpec::Core::RakeTask.new(:rspec) do |spec|
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.rspec_opts = ['-cfs --backtrace']
end
-task :default => :test
+task :default => :rspec
View
@@ -19,4 +19,8 @@ Gem::Specification.new do |s|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
+
+ s.add_development_dependency('rspec')
+ s.add_development_dependency('timecop')
+ s.add_development_dependency('rake')
end
View
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require File.dirname(__FILE__) + '/spec_helper'
describe "generating a random base32 secret" do
it "should be 16 characters by default" do
View
@@ -1,6 +1,8 @@
require 'rubygems'
require 'bundler/setup'
require 'timecop'
+require 'rspec'
+require 'rspec/autorun'
require 'rotp'

0 comments on commit f16f94f

Please sign in to comment.