From ea0799270e967afdcba8fb8d6f85765cdfc2768c Mon Sep 17 00:00:00 2001 From: Matt Mueller Date: Wed, 19 Feb 2014 16:09:46 -0600 Subject: [PATCH] Adding rspec. --- spec/spec_helper.rb | 20 ++++++++++++++++++++ two_factor_authentication.gemspec | 1 + 2 files changed, 21 insertions(+) create mode 100644 spec/spec_helper.rb diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..117017d --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,20 @@ +require "rubygems" +require "bundler/setup" + +require 'two_factor_authentication' + +Dir["#{Dir.pwd}/spec/support/**/*.rb"].each {|f| require f} + + +# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration +RSpec.configure do |config| + config.treat_symbols_as_metadata_keys_with_true_values = true + config.run_all_when_everything_filtered = true + config.filter_run :focus + + # Run specs in random order to surface order dependencies. If you find an + # order dependency and want to debug it, you can fix the order by providing + # the seed, which is printed after each run. + # --seed 1234 + config.order = 'random' +end diff --git a/two_factor_authentication.gemspec b/two_factor_authentication.gemspec index aef25d6..60955a8 100644 --- a/two_factor_authentication.gemspec +++ b/two_factor_authentication.gemspec @@ -24,6 +24,7 @@ Gem::Specification.new do |s| s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] + s.add_development_dependency "rspec" s.add_runtime_dependency 'rails', '>= 3.1.1' s.add_runtime_dependency 'devise' s.add_runtime_dependency 'randexp'