Sha256: c0d1621268c43b6861a49a32858ef3ae4a329a6931d9333bec509ee01c9658ec

Contents?: true

Size: 852 Bytes

Versions: 3

Compression:

Stored size: 852 Bytes

Contents

require 'spec_helper'

describe Furter::Accessors::Button do
  let(:button) { Furter::Accessors::Button.new(:text => 'Some Text') }
  let(:selector) { button.send(:selector) }

  context 'locating buttons' do
    it 'can be found by text' do
      text_button = Furter::Accessors::Button.new(:text => 'Some Text')
      text_button.send(:selector).should eq("button label text:'Some Text'")
    end

    it ':text is the same as :label' do
      label_button = Furter::Accessors::Button.new(:label => 'Some Text')
      label_button.send(:selector).should eq("button marked:'Some Text'")
    end

    it 'can be a custom button type as well' do
      custom_button = Furter::Accessors::Button.new(:label => 'Some Label', :type => 'MyButtonType')
      custom_button.send(:selector).should eq("view:'MyButtonType' marked:'Some Label'")
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
furter-0.0.3.2 spec/lib/furter/accessors/button_spec.rb
furter-0.0.3.1 spec/lib/furter/accessors/button_spec.rb
furter-0.0.3 spec/lib/furter/accessors/button_spec.rb