Sha256: d290300e457bbf08cf3639ddaba2c80211c460634e36362244cf069301f808de

Contents?: true

Size: 663 Bytes

Versions: 3

Compression:

Stored size: 663 Bytes

Contents

require 'spec_helper'
require 'awt/component'

describe 'java.awt.Component' do
  context 'defining new methods' do
    it 'changes derived Ruby subclases' do
      button = Swing::JButton.new 'Disconnect'
      button.should respond_to :blah
      button.blah
    end

    it 'changes derived pure Java subclases' do
      button = javax.swing.JButton.new 'Disconnect'
      button.should respond_to :blah
      button.blah
    end
  end

  context 'with Attributes extension' do
    it 'allows pure Java subclasses to accept options' do
      button = javax.swing.JButton.new 'Disconnect', :enabled => false
      button.should_not be_enabled
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
swing-0.1.5 spec/awt/component_spec.rb
swing-0.1.4 spec/awt/component_spec.rb
swing-0.1.3 spec/awt/component_spec.rb