<commit_before>require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe "MplayerScreenshot" do
  before(:each) do
    @test_video = File.expand_path(File.dirname(__FILE__) + "/library/test.mp4")
  end
  
  it "should take a screenshot at the 25th second" do
    MPlayer::Screenshoter.new(@test_video).take(:at => 25, :filename => 'test.png')
    File.exists?('test.png').should be_true
  end
end<commit_msg>added more specs<commit_after>require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe "MplayerScreenshot" do
  before(:each) do
    @test_video = File.expand_path(File.dirname(__FILE__) + "/library/test.mp4")
  end
  
  it "should take a screenshot at the 25th second" do
    MPlayer::Screenshoter.new(@test_video, 'mplayer').take(:at => 25, :filename => 'test.png')
    File.exists?('test.png').should be_true
  end
  
  it "should provide a take method through Screenshot module" do
    MPlayer::Screenshot.take(@test_video, :at => 20, :filename => 'test.png')
    File.exists?('test.png').should be_true
  end
  
  it "should raise some errors if :at is missing" do
    lambda {MPlayer::Screenshot.take(@test_video, :filename => 'test.png')}.should raise_error
  end
  
  it "should raise some errors if :filename is missing" do
    lambda {MPlayer::Screenshot.take(@test_video, :at => 4)}.should raise_error
  end
end
{'fraction_non_alphanumeric': 0.13679590343818582, 'fraction_numerical': 0.009509875640087784, 'mean_word_length': 4.493975903614458, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7225781', 'n_tokens_mistral': 477, 'n_tokens_neox': 454, 'n_words': 112}