Sha256: 5c55aa05f5bdb5723026c886b6f24b9401c75af12244f85a76b9535f6f064e40

Contents?: true

Size: 861 Bytes

Versions: 1

Compression:

Stored size: 861 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

1 entries across 1 versions & 1 rubygems

Version Path
furter-0.0.3.3 spec/lib/furter/accessors/button_spec.rb