Sha256: d666de9ee507fff193a05004186ae300cd23282a936ed647a928735f3a86983b
Contents?: true
Size: 666 Bytes
Versions: 15
Compression:
Stored size: 666 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') describe Roodi::Checks::ControlCouplingCheck do before(:each) do @roodi = Roodi::Core::Runner.new(Roodi::Checks::ControlCouplingCheck.make) end it "should reject methods with if checks using a parameter" do content = <<-END def write(quoted, foo) if quoted write_quoted(@value) else puts @value end end END @roodi.check_content(content) errors = @roodi.errors errors.should_not be_empty errors[0].to_s.should match(/dummy-file.rb:[2-3] - Method \"write\" uses the argument \"quoted\" for internal control./) end end
Version data entries
15 entries across 15 versions & 2 rubygems