Skip to content
Browse files

Add empty spec structure. judofyr/gash#7

  • Loading branch information...
1 parent f465655 commit 33685381795559bdd110dc20c710ebc3233c3baa @oleander oleander committed Feb 27, 2012
Showing with 39 additions and 0 deletions.
  1. +5 −0 .rspec
  2. +5 −0 Gemfile
  3. +5 −0 spec/gash_spec.rb
  4. +10 −0 spec/spec_helper.rb
  5. +14 −0 spec/support/helper.rb
View
5 .rspec
@@ -0,0 +1,5 @@
+--color
+-fs
+-Ilib
+-Ispec
+--require spec_helper
View
5 Gemfile
@@ -1,2 +1,7 @@
source :rubygems
gemspec
+
+group :test do
+ gem "rspec-core"
+ gem "rspec"
+end
View
5 spec/gash_spec.rb
@@ -0,0 +1,5 @@
+describe Gash do
+ it "should not crash" do
+ true.should be_true
+ end
+end
View
10 spec/spec_helper.rb
@@ -0,0 +1,10 @@
+require "rspec"
+require "gash"
+require "./spec/support/helper"
+
+RSpec.configure do |config|
+ config.mock_with :rspec
+ config.include Helper
+ config.before(:each) { setup }
+ config.after(:each) { teardown }
+end
View
14 spec/support/helper.rb
@@ -0,0 +1,14 @@
+require "digest/sha1"
+module Helper
+ def path
+ @@path ||= "/tmp/#{Digest::SHA1.hexdigest(Time.now.to_s)}.git"
+ end
+
+ def setup
+ `mkdir #{path} && cd #{path} && git init`
+ end
+
+ def teardown
+ `rm -rf #{path}`
+ end
+end

0 comments on commit 3368538

Please sign in to comment.
Something went wrong with that request. Please try again.