Sha256: 3fbff51df5ae07483a063a0169d94e60f51a96f91e7940de0b02ee6d842ddbfa

Contents?: true

Size: 648 Bytes

Versions: 5

Compression:

Stored size: 648 Bytes

Contents

shared_examples_for "animate DSL method" do
  context "defaults" do
    let(:animation) { dsl.animate {} }

    it "is a Shoes::Animation" do
      expect(animation).to be_an_instance_of(Shoes::Animation)
    end

    it "framerate is 10" do
      expect(animation.framerate).to eq 10
    end
  end

  context "with numeric argument" do
    let(:animation) { dsl.animate(13) {} }

    it "sets framerate" do
      expect(animation.framerate).to eq(13)
    end
  end

  context "with hash argument" do
    let(:animation) { dsl.animate(:framerate => 17) {} }

    it "sets framerate" do
      expect(animation.framerate).to eq(17)
    end
  end
end

Version data entries

5 entries across 5 versions & 4 rubygems

Version Path
shoes-core-4.0.0.pre4 spec/shoes/shared_examples/dsl/animate.rb
shoes-core-4.0.0.pre3 spec/shoes/shared_examples/dsl/animate.rb
shoes-swt-4.0.0.pre2 spec/shoes/shared_examples/dsl/animate.rb
shoes-dsl-4.0.0.pre2 spec/shoes/shared_examples/dsl/animate.rb
shoes-4.0.0.pre1 spec/shoes/shared_examples/dsl/animate.rb