Skip to content
This repository has been archived by the owner on Jan 31, 2019. It is now read-only.

Commit

Permalink
remove the cargo cult
Browse files Browse the repository at this point in the history
  • Loading branch information
technoweenie committed Sep 17, 2011
1 parent eaa3d72 commit f0fde72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions services/sourcemint.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
class Service::GitLive < Service
self.title = 'sourcemint'
class Service::Sourcemint < Service
def receive_push
http_post 'http://api.sourcemint.com/actions/post-commit',
:payload => JSON.generate(payload)
Expand Down
5 changes: 3 additions & 2 deletions test/sourcemint_test.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
require File.expand_path('../helper', __FILE__)

class AcunoteTest < Service::TestCase
class SourcemintTest < Service::TestCase
def setup
@stubs = Faraday::Adapter::Test::Stubs.new
end

def test_push
url = "/actions/post-commit"
@stubs.post url do |env|
assert_equal 'api.sourcemint.com', env[:url].host
assert_equal "payload=%22payload%22", env[:body]
[200, {}, '']
end
Expand All @@ -17,7 +18,7 @@ def test_push
end

def service(*args)
super Service::Acunote, *args
super Service::Sourcemint, *args
end
end

0 comments on commit f0fde72

Please sign in to comment.