Sha256: fd9803eefa321041c1b4db1f33ba56130979a2d26a8818f057f21b00400adc16

Contents?: true

Size: 669 Bytes

Versions: 1

Compression:

Stored size: 669 Bytes

Contents

require "spec_helper"
require_relative '../lib/middleman/versions/helpers/file_handler'

describe "FileHandler" do
  it "load_file method must return a non empty hash from json file" do
    version_hash = Middleman::Versions::FileHandler::load_file(File.join(File.dirname(__FILE__),"../fixtures/directory_with_files/v2.json"))
    expect(version_hash).to include({"swagger" => "2.0"})
  end
  it "load_file method must return a non empty hash from yml file" do
    version_hash = Middleman::Versions::FileHandler::load_file(File.join(File.dirname(__FILE__),"../fixtures/directory_with_files/v1.yml"))
    expect(version_hash).to include({"swagger" => "2.0"})
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
middleman-versions-1.0.1 spec/file_handler_spec.rb