spec/shoes/swt/animation_spec.rb in shoes-swt-4.0.0.pre4 vs spec/shoes/swt/animation_spec.rb in shoes-swt-4.0.0.pre5
- old
+ new
@@ -1,12 +1,12 @@
-require 'shoes/swt/spec_helper'
+require 'spec_helper'
describe Shoes::Swt::Animation do
include_context 'swt app'
- let(:dsl) { double('dsl', :stopped? => false, :removed? => false,
- :framerate => 10, :current_frame => nil,
- :increment_frame => nil, :blk => block) }
+ let(:dsl) { double('dsl', stopped?: false, removed?: false,
+ framerate: 10, current_frame: nil,
+ increment_frame: nil, blk: block) }
let(:block) { double 'block', call: nil }
let(:display) { ::Swt.display }
subject { Shoes::Swt::Animation.new dsl, swt_app }
before :each do
@@ -49,11 +49,11 @@
end
describe 'disabled' do
describe 'stopped?' do
before :each do
- allow(dsl).to receive_messages :stopped? => true
+ allow(dsl).to receive_messages stopped?: true
task.call
end
it 'does not call the block' do
expect(block).to_not have_received :call
@@ -65,11 +65,11 @@
end
end
describe 'removed?' do
before :each do
- allow(dsl).to receive_messages :removed? => true
+ allow(dsl).to receive_messages removed?: true
task.call
end
it 'does not call the block when removed' do
expect(block).to_not have_received :call
@@ -79,8 +79,7 @@
# one time is initialize
expect(display).to have_received(:timer_exec).exactly(1).times
end
end
end
-
end
end