2011-11-23 21:30:09 +00:00
|
|
|
# Read about factories at http://github.com/thoughtbot/factory_girl
|
2012-03-03 17:06:44 +00:00
|
|
|
include ActionDispatch::TestProcess
|
2011-11-23 21:30:09 +00:00
|
|
|
|
|
|
|
FactoryGirl.define do
|
2013-08-25 14:34:02 +00:00
|
|
|
fixture_file = lambda { |name, mime_type|
|
2013-09-23 17:05:36 +00:00
|
|
|
Asciinema::FixtureHelpers.fixture_file(name, mime_type)
|
2013-08-25 14:34:02 +00:00
|
|
|
}
|
|
|
|
|
2011-11-23 21:30:09 +00:00
|
|
|
factory :asciicast do
|
2015-02-28 17:39:31 +00:00
|
|
|
version 1
|
2012-03-04 17:14:58 +00:00
|
|
|
association :user
|
|
|
|
title "bashing"
|
2015-02-27 14:50:31 +00:00
|
|
|
duration 11.146430015564
|
2013-08-04 20:39:55 +00:00
|
|
|
terminal_type "screen-256color"
|
|
|
|
terminal_columns 96
|
|
|
|
terminal_lines 26
|
|
|
|
shell "/bin/zsh"
|
2013-05-27 19:25:29 +00:00
|
|
|
views_count 1
|
2015-02-28 16:54:51 +00:00
|
|
|
file { fixture_file['1/asciicast.json', 'application/json'] }
|
2013-09-21 11:03:26 +00:00
|
|
|
stdout_frames { fixture_file['stdout.json', 'application/json'] }
|
|
|
|
snapshot JSON.parse(File.read('spec/fixtures/snapshot.json'))
|
2011-11-23 21:30:09 +00:00
|
|
|
end
|
2015-02-28 16:54:51 +00:00
|
|
|
|
|
|
|
factory :legacy_asciicast, parent: :asciicast do
|
2015-02-28 17:39:31 +00:00
|
|
|
version 0
|
2015-02-28 16:54:51 +00:00
|
|
|
file nil
|
|
|
|
stdout_data { fixture_file['0.9.9/stdout', 'application/octet-stream'] }
|
|
|
|
stdout_timing { fixture_file['0.9.9/stdout.time', 'application/octet-stream'] }
|
|
|
|
uname 'Linux 3.9.9-302.fc19.x86_64 #1 SMP Sat Jul 6 13:41:07 UTC 2013 x86_64'
|
|
|
|
end
|
2011-11-23 21:30:09 +00:00
|
|
|
end
|