Sha256: af610cc08751271b28eb4503637527aa14fdf6812dc485543d89e2bd6b0485d8

Contents?: true

Size: 629 Bytes

Versions: 7

Compression:

Stored size: 629 Bytes

Contents

require 'spec_helper'

describe Check do
  strategy_klass = Class.new do
    def success?
      true
    end

    def initialize(sample=nil)
    end
  end

  sample_klass = Class.new do; end

  it "add a sample and a comparator" do
    Check.new(strategy_klass,sample_klass.new)
  end

  it "is true if the check is successfull" do
    check = Check.new(strategy_klass,sample_klass.new)
    result = check.success?
    expect(result).to eq(true)
  end

  it "is able to return the sample of the check" do
    sample = sample_klass.new
    check = Check.new(strategy_klass,sample)
    expect(check.sample).to eq(sample)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
the_array_comparator-0.5.0 spec/check_spec.rb
the_array_comparator-0.4.0 spec/check_spec.rb
the_array_comparator-0.3.4 spec/check_spec.rb
the_array_comparator-0.3.1 spec/check_spec.rb
the_array_comparator-0.3.0 spec/check_spec.rb
the_array_comparator-0.2.0 spec/check_spec.rb
the_array_comparator-0.1.1 spec/check_spec.rb