Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw a video not implementedm error upon calling that method #775

Merged
merged 1 commit into from
Jul 2, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/shoes/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def gem(name)
require 'shoes/common/inspect'
require 'shoes/dimension'
require 'shoes/dimensions'
require 'shoes/not_implemented_error'
require 'shoes/text_block_dimensions'

require 'shoes/color'
Expand Down Expand Up @@ -583,6 +584,14 @@ def download(name, args={}, &blk)
def gutter
@__app__.gutter
end

def video(*args)
raise Shoes::NotImplementedError,
'Sorry video support has been cut from shoes 4!' +
' Check out github issue #113 for any changes/updates or if you' +
' want to help :)'
end

end
end

Expand Down
4 changes: 4 additions & 0 deletions lib/shoes/not_implemented_error.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class Shoes
class NotImplementedError < StandardError
end
end
1 change: 1 addition & 0 deletions spec/shoes/shared_examples/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
stroke
strokewidth
style
video
].each do |method|
include_examples "#{method} DSL method"
end
Expand Down
5 changes: 5 additions & 0 deletions spec/shoes/shared_examples/dsl/video.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
shared_examples_for 'video DSL method' do
it 'throws a Shoes::NotImplementedError' do
expect{dsl.video}.to raise_error Shoes::NotImplementedError
end
end