Sha256: c069982f3968fc5901ac771904e6acc73c5fb337cc2dd154a52e3dc0c1fbcbdd

Contents?: true

Size: 1.74 KB

Versions: 42

Compression:

Stored size: 1.74 KB

Contents

require 'spec_helper'

require 'ruby_app/element'

describe RubyApp::Element do
  include_context 'RubyApp::Request'

  describe RubyApp::Element::Event do

    describe 'positive' do

      describe 'class' do

        specify { RubyApp::Element::Event.should respond_to('from_hash') }

      end

      describe 'instance' do

        let(:element) { RubyApp::Element.new }
        let(:event) { RubyApp::Element::Event.new('now' => Time.now.to_s, 'source_id' => element.element_id) }

        specify { event.should respond_to('now') }
        specify { event.should respond_to('source') }
        specify { event.source.should_not be_nil }
        specify { event.source.should == element }

        specify { event.should respond_to('process!') }
        specify { event.should respond_to('alert') }
        specify { event.should respond_to('refresh') }
        specify { event.should respond_to('show_dialog') }
        specify { event.should respond_to('hide_dialog') }
        specify { event.should respond_to('update_element') }
        specify { event.should respond_to('update_text') }
        specify { event.should respond_to('update_value') }
        specify { event.should respond_to('go') }
        specify { event.should respond_to('execute') }
        specify { event.should respond_to('to_hash') }

      end

    end

    describe 'negative' do

    end

  end

  describe 'positive' do

    describe 'class' do

      specify { RubyApp::Element.should respond_to('get_element') }

    end

    describe 'instance' do

      let(:element) { RubyApp::Element.new }

      specify { element.should respond_to('attributes') }
      specify { RubyApp::Element.get_element(element.element_id).should == element }

    end

  end

  describe 'negative' do
  end

end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
RubyApp-0.0.48 spec/element_spec.rb
RubyApp-0.0.47 spec/element_spec.rb