Sha256: 95e2064f993e4ae8ad2f3b544509ff907a7dd06ea3e729517bff81047fed01de
Contents?: true
Size: 1000 Bytes
Versions: 13
Compression:
Stored size: 1000 Bytes
Contents
require 'spec_helper' describe ServerMetrics::Collector do let(:collector) { ServerMetrics::Collector.new } describe '#linux?' do it 'is true when target OS starts with linux' do collector.should_receive(:ruby_config). and_return( {'target_os' => 'linux42.0'} ) expect(collector.linux?).to be true end it 'is false when target OS does not start with linux' do collector.should_receive(:ruby_config). and_return( {'target_os' => 'chunkybacon'} ) expect(collector.linux?).to be false end end describe '#osx?' do it 'is true when target OS starts with darwin' do collector.should_receive(:ruby_config). and_return( {'target_os' => 'darwin42.0'} ) expect(collector.osx?).to be true end it 'is false when target OS does not start with darwin' do collector.should_receive(:ruby_config). and_return( {'target_os' => 'chunkybacon'} ) expect(collector.osx?).to be false end end end
Version data entries
13 entries across 13 versions & 1 rubygems