Sha256: afef5957c0fa42cb402097612c007f60329cecf0a0dd05eb0006bb329d810cbf

Contents?: true

Size: 892 Bytes

Versions: 23

Compression:

Stored size: 892 Bytes

Contents

require 'spec_helper'
require 'dedalus'

describe Dedalus do
  it "should have a VERSION constant" do
    expect(subject.const_get('VERSION')).to_not be_empty
  end
end

describe ApplicationViewComposer do
  before { Dedalus.activate!(app_view) }
  subject(:composer) { ApplicationViewComposer.new }
  let(:app_view) { instance_double(Dedalus::ApplicationView, font: font) }
  let(:font) { instance_double(Gosu::Font, height: 10, text_width: 10) }
  describe "#render" do
    context "a single atom" do
      let(:atom) { Dedalus::Elements::Paragraph.new }
      let(:origin) { [0,0] }
      let(:dimensions) { [1024,720] }

      it 'should update position and render' do
        expect(atom).to receive(:position=).with(origin)
        expect(atom).to receive(:render)
        composer.render!(atom, origin: origin, dimensions: dimensions,mouse_position: [0,0])
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
dedalus-0.2.21 spec/dedalus_spec.rb
dedalus-0.2.20 spec/dedalus_spec.rb
dedalus-0.2.19 spec/dedalus_spec.rb
dedalus-0.2.18 spec/dedalus_spec.rb
dedalus-0.2.17 spec/dedalus_spec.rb
dedalus-0.2.16 spec/dedalus_spec.rb
dedalus-0.2.15 spec/dedalus_spec.rb
dedalus-0.2.13 spec/dedalus_spec.rb
dedalus-0.2.12 spec/dedalus_spec.rb
dedalus-0.2.11 spec/dedalus_spec.rb
dedalus-0.2.10 spec/dedalus_spec.rb
dedalus-0.2.9 spec/dedalus_spec.rb
dedalus-0.2.8 spec/dedalus_spec.rb
dedalus-0.2.7 spec/dedalus_spec.rb
dedalus-0.2.6 spec/dedalus_spec.rb
dedalus-0.2.5 spec/dedalus_spec.rb
dedalus-0.2.4 spec/dedalus_spec.rb
dedalus-0.2.3 spec/dedalus_spec.rb
dedalus-0.2.2 spec/dedalus_spec.rb
dedalus-0.2.1.1 spec/dedalus_spec.rb