Sha256: b5a3a9e2efc077119c039c4509f1bd3461cd06a0556e4b9bcf8b5af2a96fc7e2

Contents?: true

Size: 722 Bytes

Versions: 3

Compression:

Stored size: 722 Bytes

Contents

require 'pathname'
require Pathname(__FILE__).dirname.expand_path.join('..', '..', 'spec_helper')

describe Yardstick::Rule do
  describe '#eql?' do
    describe 'when rules are equal' do
      before do
        @rule  = Yardstick::Rule.new('test rule') { true }
        @other = Yardstick::Rule.new('test rule') { true }
      end

      it 'should return true' do
        @rule.eql?(@other).should be_true
      end
    end

    describe 'when rules are not equal' do
      before do
        @rule  = Yardstick::Rule.new('test rule')  { true }
        @other = Yardstick::Rule.new('other rule') { true }
      end

      it 'should return false' do
        @rule.eql?(@other).should be_false
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
dkubb-yardstick-0.1.0 spec/semipublic/yardstick/rule_spec.rb
yardstick-0.2.0 spec/semipublic/yardstick/rule_spec.rb
yardstick-0.1.0 spec/semipublic/yardstick/rule_spec.rb