Sha256: 1d05cdf9d490b6f91622604b86a3700192a4694c37bc08db3b6f6143f80012fd

Contents?: true

Size: 566 Bytes

Versions: 11

Compression:

Stored size: 566 Bytes

Contents

require 'spec_helper'

module Kosher
  describe Condition do
    before do
      @condition = Condition.new
    end

    describe "#kosher?" do
      before do
        @condition.threshold = 4
      end

      context "when grade within threshold" do
        it "returns true" do
          @condition.grade = 4
          @condition.should be_kosher
        end
      end

      context "when grade not within threshold" do
        it "returns false" do
          @condition.grade = 5
          @condition.should_not be_kosher
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
kosher-0.2.11 spec/kosher/condition_spec.rb
kosher-0.2.10 spec/kosher/condition_spec.rb
kosher-0.2.9 spec/kosher/condition_spec.rb
kosher-0.2.8 spec/kosher/condition_spec.rb
kosher-0.2.7 spec/kosher/condition_spec.rb
kosher-0.2.6 spec/kosher/condition_spec.rb
kosher-0.2.5 spec/kosher/condition_spec.rb
kosher-0.2.4 spec/kosher/condition_spec.rb
kosher-0.2.3 spec/kosher/condition_spec.rb
kosher-0.2.2 spec/kosher/condition_spec.rb
kosher-0.2.1 spec/kosher/condition_spec.rb