Skip to content

Commit

Permalink
Merge pull request airbnb#52 from airbnb/fix_specs
Browse files Browse the repository at this point in the history
fix failing specs
  • Loading branch information
igor47 committed Apr 23, 2014
2 parents d9cd58a + 8b2a7aa commit c910e06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions lib/nerve/reporter.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'nerve/utils'
require 'nerve/log'
require 'nerve/reporter/base'

module Nerve
class Reporter
Expand Down
10 changes: 5 additions & 5 deletions spec/example_services_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
service_data = JSON.parse(IO.read("#{File.dirname(__FILE__)}/../example/nerve_services/#{item}"))
service_data['name'] = item.gsub(/\.json$/, '')
service_data['instance_id'] = '1'

context "when #{item} can be initialized as a valid reporter" do
reporter = nil
it 'Can new_from_service' do
it 'creates a valid reporter in new_from_service' do
reporter = nil
expect { reporter = Nerve::Reporter.new_from_service(service_data) }.to_not raise_error()
end
it 'Created a reporter object' do
expect(reporter.is_a?(Nerve::Reporter::Base)).to eql(true)
end
end

context "when #{item} can be initialized as a valid service watcher" do
it do
it "creates a valid service watcher for #{item}" do
watcher = nil
expect { watcher = Nerve::ServiceWatcher.new(service_data) }.to_not raise_error()
expect(watcher.is_a?(Nerve::ServiceWatcher)).to eql(true)
Expand Down

0 comments on commit c910e06

Please sign in to comment.