Permalink
Browse files

Bringing riot-gear back from the middle-ages

Tied to the most recent riot as well.
  • Loading branch information...
gus committed May 1, 2012
1 parent a47953d commit 0eab1d034721782412da8a94588055a31cce4c30
Showing with 39 additions and 98 deletions.
  1. +1 −0 .gitignore
  2. +8 −0 Gemfile
  3. +4 −24 Rakefile
  4. +6 −0 lib/riot/gear/version.rb
  5. +16 −71 riot-gear.gemspec
  6. +4 −3 test/setting_up_gear_context_test.rb
View
@@ -6,4 +6,5 @@ pkg/*
*.swp
.watchr
.yardoc
+Gemfile.lock
View
@@ -0,0 +1,8 @@
+source "http://rubygems.org"
+
+gemspec
+
+group "test" do
+ gem "rake", ">=0.8.7"
+end
+
View
@@ -1,6 +1,6 @@
require 'rubygems'
-
-require 'rake'
+require 'bundler'
+Bundler::GemHelper.install_tasks
require 'rake/testtask'
#
@@ -15,34 +15,14 @@ task(:console) { exec "irb -r boot" }
#
# Testing
+task :default => ["test"]
Rake::TestTask.new("test") do |t|
t.libs << "test"
t.pattern = "test/**/*_test.rb"
+ #t.warning = true
t.verbose = false
end
-Rake::Task["test"].instance_variable_set(:@full_comment, nil) # Dumb dumb dumb
-Rake::Task["test"].comment = "Run the tests!"
task :default => :test
-#
-# Some monks like diamonds. I like gems.
-
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "riot-gear"
- gem.summary = "Riot + HTTParty smoke testing framework"
- gem.description = "Riot + HTTParty smoke testing framework. You'd use it for integration testing with real HTTP requests and responses"
- gem.email = "gus@gusg.us"
- gem.homepage = "http://github.com/thumblemonks/riot-gear"
- gem.authors = ["Justin 'Gus' Knowlden"]
- gem.add_dependency 'riot'
- gem.add_dependency 'httparty'
- gem.add_development_dependency 'webmock', ">=1.6.1"
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
-end
View
@@ -0,0 +1,6 @@
+module Riot
+ module Gear
+ VERSION = "0.0.8"
+ end
+end
+
View
@@ -1,78 +1,23 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
+$:.unshift(File.expand_path("../lib", __FILE__))
+require "riot/gear/version"
Gem::Specification.new do |s|
- s.name = %q{riot-gear}
- s.version = "0.0.8"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Justin 'Gus' Knowlden"]
- s.date = %q{2010-12-23}
- s.description = %q{Riot + HTTParty smoke testing framework. You'd use it for integration testing with real HTTP requests and responses}
- s.email = %q{gus@gusg.us}
- s.extra_rdoc_files = [
- "README.md"
- ]
- s.files = [
- "README.md",
- "Rakefile",
- "VERSION",
- "lib/riot/gear.rb",
- "lib/riot/gear/context.rb",
- "lib/riot/gear/context/asserts_header.rb",
- "lib/riot/gear/context/asserts_json.rb",
- "lib/riot/gear/context/asserts_status.rb",
- "lib/riot/gear/context/persist_cookie.rb",
- "lib/riot/gear/middleware.rb",
- "lib/riot/gear/middleware/riotparty.rb",
- "riot-gear.gemspec",
- "test/actions/delete_test.rb",
- "test/actions/get_test.rb",
- "test/actions/post_test.rb",
- "test/actions/put_test.rb",
- "test/assertions/asserts_json_test.rb",
- "test/helpers/cookie_values_test.rb",
- "test/helpers/json_path_test.rb",
- "test/riotparty_proxy_methods_test.rb",
- "test/setting_up_gear_context_test.rb",
- "test/teststrap.rb"
- ]
- s.homepage = %q{http://github.com/thumblemonks/riot-gear}
+ s.name = %q{riot-gear}
+ s.version = Riot::Gear::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Justin 'Gus' Knowlden"]
+ s.summary = %q{Riot + HTTParty smoke testing framework.}
+ s.description = %q{Riot + HTTParty smoke testing framework. You'd use it for integration testing with real HTTP requests and responses}
+ s.email = %q{gus@gusg.us}
+ s.files = `git ls-files`.split("\n")
+ s.homepage = %q{http://github.com/thumblemonks/riot-gear}
s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.7}
- s.summary = %q{Riot + HTTParty smoke testing framework}
- s.test_files = [
- "test/actions/delete_test.rb",
- "test/actions/get_test.rb",
- "test/actions/post_test.rb",
- "test/actions/put_test.rb",
- "test/assertions/asserts_json_test.rb",
- "test/helpers/cookie_values_test.rb",
- "test/helpers/json_path_test.rb",
- "test/riotparty_proxy_methods_test.rb",
- "test/setting_up_gear_context_test.rb",
- "test/teststrap.rb"
- ]
-
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<riot>, [">= 0"])
- s.add_runtime_dependency(%q<httparty>, [">= 0"])
- s.add_development_dependency(%q<webmock>, [">= 1.6.1"])
- else
- s.add_dependency(%q<riot>, [">= 0"])
- s.add_dependency(%q<httparty>, [">= 0"])
- s.add_dependency(%q<webmock>, [">= 1.6.1"])
- end
- else
- s.add_dependency(%q<riot>, [">= 0"])
- s.add_dependency(%q<httparty>, [">= 0"])
- s.add_dependency(%q<webmock>, [">= 1.6.1"])
- end
+ s.add_dependency 'riot', '>=0.12.5'
+ s.add_dependency 'crack', '>=0.1.7'
+ s.add_dependency 'httparty', '>=0.6.0'
+ s.add_dependency 'webmock', '>=1.6.1'
end
@@ -9,7 +9,7 @@
setup { gear_up.topic }
asserts_topic.kind_of(Class)
- asserts("equivalence of the topic for similar contexts") { topic == gear_up.topic }.not!
+ denies("equivalence of the topic for similar contexts") { topic == gear_up.topic }
end # Setting up a gear context
context "Gear context and its inner context" do
@@ -21,10 +21,11 @@
setup { Riot::Context.new("A") {} }
- asserts("equivalence of the topic for similar contexts") do
+ denies("equivalence of the topic for similar contexts") do
parent_topic = local_run(topic).topic
child_topic = local_run(topic.context("B") {}).topic
parent_topic == child_topic
- end.not!
+ end
end # Setting up a gear context
+

0 comments on commit 0eab1d0

Please sign in to comment.