Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds guard and background processes for requests
- Loading branch information
Chris Knadler
committed
Dec 28, 2012
1 parent
a255181
commit 2b385ee
Showing
8 changed files
with
75 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
language: ruby | ||
bundler_args: --without development | ||
rvm: | ||
- 1.9.3 | ||
- 1.9.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,25 @@ | ||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in git-feats.gemspec | ||
gemspec | ||
|
||
# ignored with Travis | ||
group :development do | ||
gem 'yard' | ||
|
||
# file system notifications | ||
gem 'rb-inotify', :require => false | ||
gem 'rb-fsevent', :require => false | ||
gem 'rb-fchange', :require => false | ||
|
||
# auto testing | ||
gem 'guard-rspec' | ||
|
||
# growl notifications for tests | ||
gem 'ruby_gntp' | ||
end | ||
|
||
# installed with Travis | ||
group :test do | ||
gem 'rspec' | ||
gem 'simplecov' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
guard 'rspec' do | ||
watch(%r{^spec/.+_spec\.rb$}) | ||
watch(%r{^lib/git-feats/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | ||
watch('spec/spec_helper.rb') { "spec" } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,28 @@ | ||
require File.expand_path('../spec_helper', __FILE__) | ||
require 'git-feats' | ||
require 'faraday' | ||
|
||
|
||
describe GitFeats::API do | ||
let(:klass) { GitFeats::API } | ||
|
||
subject { klass } | ||
|
||
describe ".upload_feats" do | ||
let(:meth) { :upload_feats } | ||
subject { klass.method(meth) } | ||
its(:arity) { should eq(0) } | ||
its(:arity) { should eq(-1) } | ||
|
||
# request mocks with faraday | ||
stubs = Faraday::Adapter::Test::Stubs.new do |stub| | ||
stub.post('/api/feats') {[200, {}, '{"message":"OK"}']} | ||
end | ||
|
||
test = Faraday.new do |builder| | ||
builder.adapter :test, stubs | ||
end | ||
|
||
it "display success if response is 200" do | ||
response = test.post('/api/feats') | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters