Sha256: b29303f9c3ac09fec7feafb0548ebe08ca1963ffb0a51304890d9ea6561a0ecf
Contents?: true
Size: 574 Bytes
Versions: 2
Compression:
Stored size: 574 Bytes
Contents
require 'spec_helper' describe WhippedCream::Button do context 'valid button' do subject(:button) { described_class.new(name, pin: valid_pin, block: block) } let(:name) { "Open/Close" } let(:valid_pin) { 4 } let(:block) { nil } its(:name) { should eq(name) } its(:id) { should eq(:open_close) } its(:type) { should eq(:button) } end context 'invalid button' do let(:invalid_pin) { 3 } it 'should raise an error on initialization' do expect { described_class.new(name, pin: invalid_pin) }.to raise_error end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
whipped-cream-0.2.0.beta1 | spec/lib/whipped-cream/button_spec.rb |
whipped-cream-0.1.1 | spec/lib/whipped-cream/button_spec.rb |