added tests for rails helper
This commit is contained in:
parent
cc2d7098d6
commit
5f0220bb12
29
spec/rails_helper_spec.rb
Normal file
29
spec/rails_helper_spec.rb
Normal file
@ -0,0 +1,29 @@
|
||||
class String
|
||||
def html_safe
|
||||
self
|
||||
end
|
||||
end
|
||||
describe Flowplayer::Helper do
|
||||
include Flowplayer::Helper
|
||||
|
||||
|
||||
|
||||
it "should render player" do
|
||||
flow_player = flowplayer_for('my_video', 'commericial.swf') do |player|
|
||||
player.fullscreen true
|
||||
player.logo(:url => nil, :opacity => 0, :fullscreenOnly => true)
|
||||
end
|
||||
flow_player.should include('$(document).ready(function() {')
|
||||
end
|
||||
|
||||
|
||||
|
||||
it "should support prototype" do
|
||||
flow_player = flowplayer_for('my_video', 'commericial.swf', 'prototype') do |player|
|
||||
player.fullscreen true
|
||||
player.logo(:url => nil, :opacity => 0, :fullscreenOnly => true)
|
||||
end
|
||||
flow_player.should include('document.observe("dom:loaded", function() {')
|
||||
end
|
||||
|
||||
end
|
@ -1 +1,2 @@
|
||||
require File.expand_path('../../lib/flowplayer', __FILE__)
|
||||
require 'flowplayer/railties/helper'
|
Loading…
Reference in New Issue
Block a user