Sha256: e4169182c8f4bd9562b00960367c5e2fc431ac1415d4ceef5b5c710d8a6a3447

Contents?: true

Size: 565 Bytes

Versions: 21

Compression:

Stored size: 565 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

21 entries across 21 versions & 1 rubygems

Version Path
kosher-0.8.0 spec/kosher/condition_spec.rb
kosher-0.7.0 spec/kosher/condition_spec.rb
kosher-0.6.2 spec/kosher/condition_spec.rb
kosher-0.6.1 spec/kosher/condition_spec.rb
kosher-0.6.0 spec/kosher/condition_spec.rb
kosher-0.5.0 spec/kosher/condition_spec.rb
kosher-0.4.0 spec/kosher/condition_spec.rb
kosher-0.3.0 spec/kosher/condition_spec.rb
kosher-0.2.24 spec/kosher/condition_spec.rb
kosher-0.2.23 spec/kosher/condition_spec.rb
kosher-0.2.22 spec/kosher/condition_spec.rb
kosher-0.2.21 spec/kosher/condition_spec.rb
kosher-0.2.20 spec/kosher/condition_spec.rb
kosher-0.2.19 spec/kosher/condition_spec.rb
kosher-0.2.18 spec/kosher/condition_spec.rb
kosher-0.2.17 spec/kosher/condition_spec.rb
kosher-0.2.16 spec/kosher/condition_spec.rb
kosher-0.2.15 spec/kosher/condition_spec.rb
kosher-0.2.14 spec/kosher/condition_spec.rb
kosher-0.2.13 spec/kosher/condition_spec.rb