Sha256: baff00070efb41e9de5eea1d7bc32279498dc1761b094f18ee3e1fed086ba0a7

Contents?: true

Size: 482 Bytes

Versions: 3

Compression:

Stored size: 482 Bytes

Contents

require 'spec_helper'

describe WithFilters::Action do
  describe '#initialize(type, options = {})' do
    context 'defaults' do
      subject {described_class.new(:submit)}

      its(:type)  {should be :submit}
      its(:attrs) {should == {type: :submit}}
    end

    context 'options' do
      context ':label' do
        it 'labels the button' do
          described_class.new(:submit, label: 'Submit').attrs[:value].should == 'Submit'
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
with_filters-0.1.2 spec/models/action.rb
with_filters-0.1.1 spec/models/action.rb
with_filters-0.1.0 spec/models/action.rb