require 'spec_helper'

describe 'Ruby syntax' do

  it 'is clean' do
    expect(citrus_core_warnings).to eq([])
  end

  def citrus_core_warnings
    warnings.select { |w| w =~ %r{lib/citrus/core} }
  end

  def warnings
    `ruby -w lib/citrus/core.rb 2>&1`.split("\n")
  end

end

Add spec for checking warnings.
Add spec for checking warnings.

Credits go to:
https://github.com/psyho/bogus/blob/459c02ce069ee8e246f2e7869964e29d0b061236/spec/bogus/clean_ruby_spec.rb
