Sha256: 6bcf5ffd67c88f0d3f8d4ddcfde74074d7f9373bc6aac8f410438127a6f05f8b

Contents?: true

Size: 600 Bytes

Versions: 13

Compression:

Stored size: 600 Bytes

Contents

require 'spec_helper'

module Kosher
  describe Availability do
    before do
      @availability = Availability.new
    end

    describe "#kosher?" do
      before do
        Availability.threshold = 48
      end

      context "when available within threshold" do
        it "returns true" do
          @availability.hours = 48
          @availability.should be_kosher
        end
      end

      context "when not available within threshold" do
        it "returns false" do
          @availability.hours = 96
          @availability.should_not be_kosher
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
kosher-0.2.24 spec/kosher/availability_spec.rb
kosher-0.2.23 spec/kosher/availability_spec.rb
kosher-0.2.22 spec/kosher/availability_spec.rb
kosher-0.2.21 spec/kosher/availability_spec.rb
kosher-0.2.20 spec/kosher/availability_spec.rb
kosher-0.2.19 spec/kosher/availability_spec.rb
kosher-0.2.18 spec/kosher/availability_spec.rb
kosher-0.2.17 spec/kosher/availability_spec.rb
kosher-0.2.16 spec/kosher/availability_spec.rb
kosher-0.2.15 spec/kosher/availability_spec.rb
kosher-0.2.14 spec/kosher/availability_spec.rb
kosher-0.2.13 spec/kosher/availability_spec.rb
kosher-0.2.12 spec/kosher/availability_spec.rb