Permalink
Browse files

More setup, autospec + rspec.

  • Loading branch information...
1 parent 9285985 commit 0a4b794f6ed1c1fda972405c6b7849fde864dde4 @steveklabnik committed Nov 28, 2010
Showing with 68 additions and 0 deletions.
  1. +9 −0 .autotest
  2. +5 −0 Gemfile
  3. +29 −0 Gemfile.lock
  4. +9 −0 Rakefile
  5. +1 −0 autotest/discover.rb
  6. +2 −0 pomodoro.gemspec
  7. +5 −0 spec/pomodoro_spec.rb
  8. +8 −0 spec/spec_helper.rb
View
@@ -0,0 +1,9 @@
+# ./.autotest
+Autotest.add_hook(:initialize) {|at|
+ at.add_exception %r{^\.git} # ignore Version Control System
+ at.add_mapping(%r{^lib/.*\.rb$}) {|f, _|
+ Dir['spec/**/*.rb']
+ }
+ nil
+}
+
View
@@ -2,3 +2,8 @@ source "http://rubygems.org"
# Specify your gem's dependencies in pomodoro.gemspec
gemspec
+
+group :test do
+ gem "rspec", "~>2.1.0"
+ gem "autotest"
+end
View
@@ -0,0 +1,29 @@
+PATH
+ remote: .
+ specs:
+ pomodoro (0.0.1)
+ noprocrast
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ autotest (4.4.5)
+ diff-lcs (1.1.2)
+ noprocrast (0.1.6)
+ rspec (2.1.0)
+ rspec-core (~> 2.1.0)
+ rspec-expectations (~> 2.1.0)
+ rspec-mocks (~> 2.1.0)
+ rspec-core (2.1.0)
+ rspec-expectations (2.1.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.1.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ autotest
+ noprocrast
+ pomodoro!
+ rspec (~> 2.1.0)
View
@@ -1,2 +1,11 @@
require 'bundler'
Bundler::GemHelper.install_tasks
+Bundler.setup
+
+require 'rspec/core/rake_task'
+
+desc 'Run the code in spec'
+RSpec::Core::RakeTask.new do |t|
+ t.pattern = "spec/**/*_spec.rb"
+ t.rspec_opts = "-r ./spec/spec_helper.rb"
+end
View
@@ -0,0 +1 @@
+Autotest.add_discovery { "rspec2" }
View
@@ -16,4 +16,6 @@ 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_dependency("noprocrast")
end
View
@@ -0,0 +1,5 @@
+describe Pomodoro do
+ it "passes" do
+ 1.should == 1
+ end
+end
View
@@ -0,0 +1,8 @@
+require 'rspec'
+
+require 'pomodoro'
+
+RSpec.configure do |c|
+ c.fail_fast = true #this is awesome
+end
+

0 comments on commit 0a4b794

Please sign in to comment.