Sha256: 8498c7e2b394ab8ba2f0cce8cb8d987e9e84940f109f71787367d57c6fe7cec6

Contents?: true

Size: 536 Bytes

Versions: 7

Compression:

Stored size: 536 Bytes

Contents

require 'spec_helper'

describe WhippedCream::Sensor do
  subject(:sensor) { described_class.new(name, options, &block) }

  let(:name) { "Door" }
  let(:options) {
    {
      pin: 2,
      high: "Open",
      low: "Closed",
      on_high: :door_opened
    }
  }
  let(:block) { nil }

  its(:name) { should eq(name) }
  its(:id) { should eq(:door) }

  its(:pin) { should eq(2) }

  its(:high) { should eq("Open") }
  its(:low) { should eq("Closed") }

  its(:on_high) { should eq(:door_opened) }
  its(:on_low) { should be_nil }
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
whipped-cream-0.1.0 spec/lib/whipped-cream/sensor_spec.rb
whipped-cream-0.0.1 spec/lib/whipped-cream/sensor_spec.rb
whipped-cream-0.0.1pre5 spec/lib/whipped-cream/sensor_spec.rb
whipped-cream-0.0.1pre4 spec/lib/whipped-cream/sensor_spec.rb
whipped-cream-0.0.1pre3 spec/lib/whipped-cream/sensor_spec.rb
whipped-cream-0.0.1pre2 spec/lib/whipped-cream/sensor_spec.rb
whipped-cream-0.0.1pre1 spec/lib/whipped-cream/sensor_spec.rb