Permalink
Browse files

Add a bunch of dependencies and setup RSpec with ci_reporter

  • Loading branch information...
1 parent d01ed70 commit a6be0c0750570b309e24f570ac5fb3ab367ca8ef @benlangfeld benlangfeld committed Jun 20, 2011
Showing with 49 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +3 −0 .rspec
  3. +21 −0 Rakefile
  4. +10 −0 ruby_speech.gemspec
  5. +14 −0 spec/spec_helper.rb
View
@@ -2,3 +2,4 @@
.bundle
Gemfile.lock
pkg/*
+spec/reports
View
3 .rspec
@@ -0,0 +1,3 @@
+--format documentation
+--colour
+--tty
View
@@ -1 +1,22 @@
require 'bundler/gem_tasks'
+Bundler::GemHelper.install_tasks
+
+require 'rspec/core'
+require 'rspec/core/rake_task'
+require 'ci/reporter/rake/rspec'
+RSpec::Core::RakeTask.new(:spec) do |spec|
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.rspec_opts = '--color'
+end
+
+RSpec::Core::RakeTask.new(:rcov) do |spec|
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.rcov = true
+ spec.rspec_opts = '--color'
+end
+
+task :default => :spec
+task :ci => ['ci:setup:rspec', :spec]
+
+require 'yard'
+YARD::Rake::YardocTask.new
View
@@ -17,4 +17,14 @@ 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_runtime_dependency %q<niceogiri>, [">= 0.0.4"]
+ s.add_runtime_dependency %q<activesupport>, [">= 3.0.7"]
+
+ s.add_development_dependency %q<bundler>, ["~> 1.0.0"]
+ s.add_development_dependency %q<rspec>, ["~> 2.3.0"]
+ s.add_development_dependency %q<ci_reporter>, [">= 1.6.3"]
+ s.add_development_dependency %q<yard>, ["~> 0.6.0"]
+ s.add_development_dependency %q<rake>, [">= 0"]
+ s.add_development_dependency %q<mocha>, [">= 0"]
end
View
@@ -0,0 +1,14 @@
+require 'ruby_speech'
+require 'mocha'
+
+Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|f| require f}
+
+RSpec.configure do |config|
+ config.mock_with :mocha
+ config.filter_run :focus => true
+ config.run_all_when_everything_filtered = true
+end
+
+def parse_xml(xml)
+ Nokogiri::XML.parse xml, nil, nil, Nokogiri::XML::ParseOptions::NOBLANKS
+end

0 comments on commit a6be0c0

Please sign in to comment.