Skip to content

Commit

Permalink
run coverage on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
baelter committed Feb 2, 2017
1 parent db6fb7a commit f0e71c6
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 15 deletions.
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
source "https://rubygems.org"

gemspec

group :test do
gem "codeclimate-test-reporter", "~> 1.0.0"
gem "simplecov", require: false
end
11 changes: 11 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,17 @@ GEM
amq-protocol (>= 2.0.1)
bunny-mock (1.5.0)
bunny (>= 1.7)
codeclimate-test-reporter (1.0.5)
simplecov
docile (1.1.5)
json (2.0.3)
minitest (5.10.1)
rake (12.0.0)
simplecov (0.13.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)

PLATFORMS
ruby
Expand All @@ -22,8 +31,10 @@ DEPENDENCIES
amqp_actors!
bundler
bunny-mock
codeclimate-test-reporter (~> 1.0.0)
minitest
rake
simplecov

BUNDLED WITH
1.13.7
4 changes: 4 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
task default: [:test]

task :test do
if ENV['CI']
require 'simplecov'
SimpleCov.start
end
Dir.glob('./spec/**/*_spec.rb').each { |file| require file }
end
2 changes: 1 addition & 1 deletion lib/amqp_actors/backend/amqp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def queue_name(q)
@queue_name = q
end

def routing_keys(rks)
def routing_keys(*rks)
@routing_keys = rks
end

Expand Down
2 changes: 1 addition & 1 deletion spec/actor_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative 'config'
require_relative 'spec_helper'

describe AmqpActors do
before do
Expand Down
17 changes: 8 additions & 9 deletions spec/amqp_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative 'config'
require_relative 'spec_helper'

describe AmqpActors::AmqpQueues do
before do
Expand All @@ -13,14 +13,13 @@

it 'should push messages' do
class AmqpActor < AmqpActors::TestActor
#backend AmqpActors::AmqpQueues do
#amqp_url 'amqp://localhost/test'
#
#queue_name 'test' #default "#{actor.class}::actor"
#routing_keys 'test.#' #default queue_name
#exchange 'amq.topic' #default amq.default
#puts 'done'
#end
backend AmqpActors::AmqpQueues do
amqp_url 'amqp://localhost/test'

queue_name 'test' # default "#{actor.class}::actor"
routing_keys 'test.#' # default queue_name
exchange 'amq.topic' # default amq.default
end

act do |msg|
output msg
Expand Down
4 changes: 0 additions & 4 deletions spec/config.rb

This file was deleted.

0 comments on commit f0e71c6

Please sign in to comment.