require 'spec_helper'
require 'pinpoint/format/file'

describe Pinpoint::Format::File do
  let(:file_class) { Pinpoint::Format::File }

  it 'can retrieve Styles for a given country' do
    allow(File).to receive(:read).and_return <<-FORMAT_YAML
      one_line: 'foo'
      multi_line: 'bar'
      html: 'baz'
    FORMAT_YAML

    styles = file_class.styles_for(:us)

    expect(styles.keys).to eql [
      :one_line,
      :multi_line,
      :html,
    ]

    expect(styles.values).to be_all { |s| s.class == Pinpoint::Format::Style }
  end
end
