Skip to content

Commit

Permalink
basic test infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
igrigorik committed Aug 4, 2013
1 parent 28da13e commit a770b5a
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 3 deletions.
19 changes: 19 additions & 0 deletions .autotest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require 'autotest/growl'

Autotest.add_hook(:initialize) {|at|
at.add_exception %r{^\.git}
at.add_exception %r{^./tmp}

at.clear_mappings

at.add_mapping(%r%^spec/.*_spec\.rb$%) { |filename, _|
filename
}
at.add_mapping(%r%^lib/(.*)\.rb$%) { |_, m|
["spec/#{m[1].split('/').last}_spec.rb"]
}
at.add_mapping(%r%^spec/(spec_helper|shared/.*)\.rb$%) {
files_matching %r%^spec/.*_spec\.rb$%
}
nil
}
3 changes: 3 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
autotest
--color
--format documentation
7 changes: 7 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
require "bundler/gem_tasks"
require "rspec/core/rake_task"

desc "Run all RSpec tests"
RSpec::Core::RakeTask.new(:spec)

task :default => :spec
task :test => [:spec]
5 changes: 3 additions & 2 deletions http2-parser.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
spec.version = Http2::Parser::VERSION
spec.authors = ["Ilya Grigorik"]
spec.email = ["ilya@igvita.com"]
spec.description = %q{TODO: Write a gem description}
spec.summary = %q{TODO: Write a gem summary}
spec.description = "HTTP 2.0 parser"
spec.summary = spec.description
spec.homepage = ""
spec.license = "MIT"

Expand All @@ -20,4 +20,5 @@ Gem::Specification.new do |spec|

spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec"
end
2 changes: 1 addition & 1 deletion lib/http2/parser.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require "http2/parser/version"

require "http2/parser/compressor"
14 changes: 14 additions & 0 deletions lib/http2/parser/compressor.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module Http2
module Parser

class CompressionContext
end

class Compressor
end

class Decompressor
end

end
end
5 changes: 5 additions & 0 deletions spec/compressor_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require 'helper'

describe Http2::Parser::Compressor do
it "should do stuff"
end
1 change: 1 addition & 0 deletions spec/helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require 'http2/parser'

0 comments on commit a770b5a

Please sign in to comment.