Sha256: cb64e2b25a14202d284c5290bef8663802f46a1b9dee162e1b142c0214a4bb2f

Contents?: true

Size: 738 Bytes

Versions: 3

Compression:

Stored size: 738 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', :enabled => false
      button.should_not be_enabled
      button.should respond_to :blah
      button.blah
    end

    it 'changes derived pure Java subclases' do
      button = javax.swing.JButton.new 'Disconnect' #, :enabled => false
      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.2 spec/awt/component_spec.rb
swing-0.1.1 spec/awt/component_spec.rb
swing-0.1.0 spec/awt/component_spec.rb