Sha256: cd14e112ab2989e77bcbb495c8d68e5a1ded6b426a86f3d2f533cc57e604273a

Contents?: true

Size: 887 Bytes

Versions: 34

Compression:

Stored size: 887 Bytes

Contents

require "spec/helper"
require "fsr/file_methods"

describe "Basic FSR::App::FileMethods module" do

  before do
    @testee = Class.new do
      include ::FSR::App::FileMethods
    end.new
    
  end

  it "should have a test_files method" do
    @testee.test_files("bla").should.equal true
  end

  it "should only test files with an absolute path" do
    lambda { @testee.test_files("/path/file") }.
      should.raise(Errno::ENOENT)
  end

  it "should handle multiple files" do
    @testee.test_files("bla.wav", "fasel.wav").should.equal true
  end

  it "should handle mixed absolute and relative files" do
    lambda { @testee.test_files("some_file.wav", "/path/file") }.
      should.raise(Errno::ENOENT)
  end

  it "should not raise if file is present" do
    file_name = File.expand_path(__FILE__)
    lambda { @testee.test_files(file_name) }.
      should.not.raise
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
freeswitcher-0.8.0 spec/fsr/file_methods.rb
freeswitcher-0.7.1 spec/fsr/file_methods.rb
freeswitcher-0.7.0 spec/fsr/file_methods.rb
freeswitcher-0.6.18 spec/fsr/file_methods.rb
freeswitcher-0.6.17 spec/fsr/file_methods.rb
freeswitcher-0.6.16 spec/fsr/file_methods.rb
freeswitcher-0.6.15 spec/fsr/file_methods.rb
freeswitcher-0.6.14 spec/fsr/file_methods.rb
freeswitcher-0.6.13 spec/fsr/file_methods.rb
freeswitcher-0.6.12 spec/fsr/file_methods.rb
freeswitcher-0.6.11 spec/fsr/file_methods.rb
freeswitcher-0.6.10 spec/fsr/file_methods.rb
freeswitcher-0.6.9 spec/fsr/file_methods.rb
freeswitcher-0.6.8 spec/fsr/file_methods.rb
freeswitcher-0.6.7 spec/fsr/file_methods.rb
freeswitcher-0.6.6 spec/fsr/file_methods.rb
freeswitcher-0.6.5 spec/fsr/file_methods.rb
freeswitcher-0.6.4 spec/fsr/file_methods.rb
freeswitcher-0.6.3 spec/fsr/file_methods.rb
freeswitcher-0.6.2 spec/fsr/file_methods.rb