File: clean_ruby_spec.rb

package info (click to toggle)
ruby-bogus 0.1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 844 kB
  • sloc: ruby: 4,237; makefile: 8; sh: 2
file content (15 lines) | stat: -rw-r--r-- 282 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'spec_helper'

describe "Ruby syntax" do
  it "is clean" do
    expect(bogus_warnings).to eq([])
  end

  def bogus_warnings
    warnings.select { |w| w =~ %r{lib/bogus} }
  end

  def warnings
    `ruby -w /usr/lib/ruby/#{RUBY_VERSION}/bogus.rb 2>&1`.split("\n")
  end
end