Skip to content

Commit

Permalink
We have the technology - we can rebuild him
Browse files Browse the repository at this point in the history
  • Loading branch information
qrush committed Jul 19, 2009
1 parent 34af752 commit 9f8551a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -7,4 +7,4 @@ require 'rake/rdoctask'
require 'tasks/rails'

desc "Run all tests and features"
task :default => [:test, :features]
task :default => ['gemcutter:index:create', :test, :features]
2 changes: 0 additions & 2 deletions config/environments/cucumber.rb
Expand Up @@ -17,5 +17,3 @@

config.gem "cucumber", :lib => false, :version => ">=0.3.9"
config.gem "webrat", :lib => false, :version => ">=0.4.4"
config.gem "rspec", :lib => false, :version => ">=1.2.6"
config.gem "rspec-rails", :lib => 'spec/rails', :version => ">=1.2.6"
2 changes: 1 addition & 1 deletion features/support/env.rb
Expand Up @@ -21,4 +21,4 @@
require 'webrat/core/matchers/have_tag'

HOST = "localhost"
TEST_DIR = File.join('/', 'tmp', 'jekyll')
TEST_DIR = File.join('/', 'tmp', 'gemcutter')
6 changes: 3 additions & 3 deletions test/unit/plugin_test.rb
Expand Up @@ -49,7 +49,7 @@ class PluginTest < Test::Unit::TestCase
mock(@command).say("Enter your Gemcutter credentials. Don't have an account yet? Create one at #{URL}/sign_up")
mock(@command).ask("Email: ") { @email }
mock(@command).ask_for_password("Password: ") { @password }
FakeWeb.register_uri :get, "http://#{@email}:#{@password}@gemcutter.org/api_key", :string => @key
FakeWeb.register_uri :get, "http://#{@email}:#{@password}@gemcutter.org/api_key", :body => @key

@config = Object.new
stub(Gem).configuration { @config }
Expand All @@ -68,15 +68,15 @@ class PluginTest < Test::Unit::TestCase
mock(@command).terminate_interaction
mock(@config).write.never

FakeWeb.register_uri :get, "http://#{@email}:#{@password}@gemcutter.org/api_key", :string => @problem, :status => 401
FakeWeb.register_uri :get, "http://#{@email}:#{@password}@gemcutter.org/api_key", :body => @problem, :status => 401
@command.sign_in
end
end

should "push a gem" do
mock(@command).say("Pushing gem to Gemcutter...")
@response = "success"
FakeWeb.register_uri :post, "http://gemcutter.org/gems", :string => @response
FakeWeb.register_uri :post, "http://gemcutter.org/gems", :body => @response

@gem = "test"
@io = "io"
Expand Down

0 comments on commit 9f8551a

Please sign in to comment.