transferred Code Ocean from original repository to GitHub
This commit is contained in:
BIN
db/seeds/audio_video/chai.ogg
Normal file
BIN
db/seeds/audio_video/chai.ogg
Normal file
Binary file not shown.
BIN
db/seeds/audio_video/devstories.mp4
Normal file
BIN
db/seeds/audio_video/devstories.mp4
Normal file
Binary file not shown.
BIN
db/seeds/audio_video/devstories.webm
Normal file
BIN
db/seeds/audio_video/devstories.webm
Normal file
Binary file not shown.
10
db/seeds/audio_video/index.html
Normal file
10
db/seeds/audio_video/index.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
|
||||
<script src="index.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>HTML5 Audio & Video</h1>
|
||||
</body>
|
||||
</html>
|
27
db/seeds/audio_video/index.html_spec.rb
Normal file
27
db/seeds/audio_video/index.html_spec.rb
Normal file
@@ -0,0 +1,27 @@
|
||||
require 'rack/file'
|
||||
require 'capybara/rspec'
|
||||
|
||||
AUDIO_FILENAME = 'chai.ogg'
|
||||
VIDEO_FILENAME = 'devstories.mp4'
|
||||
|
||||
Capybara.app = Rack::File.new(File.dirname(__FILE__))
|
||||
|
||||
describe 'index.html', type: :feature do
|
||||
before(:each) { visit('index.html') }
|
||||
|
||||
it 'contains an audio element' do
|
||||
expect(page).to have_css('audio')
|
||||
end
|
||||
|
||||
it 'plays the correct audio file' do
|
||||
expect(page).to have_css("audio[src='#{AUDIO_FILENAME}']")
|
||||
end
|
||||
|
||||
it 'contains a video element' do
|
||||
expect(page).to have_css('video')
|
||||
end
|
||||
|
||||
it 'plays the correct video file' do
|
||||
expect(page).to have_css("video[src='#{VIDEO_FILENAME}']")
|
||||
end
|
||||
end
|
3
db/seeds/audio_video/index.js
Normal file
3
db/seeds/audio_video/index.js
Normal file
@@ -0,0 +1,3 @@
|
||||
$(function() {
|
||||
//
|
||||
});
|
BIN
db/seeds/audio_video/poster.png
Normal file
BIN
db/seeds/audio_video/poster.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 140 KiB |
Reference in New Issue
Block a user