require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe RFormat do it "has a root_dir directory" do expect(RFormat::root_dir).to eq(File.expand_path('../', File.dirname(__FILE__))) end it "has a lib_dir directory" do expect(RFormat::lib_dir).to eq(File.expand_path('../lib', File.dirname(__FILE__))) end it "has a format file" do expect(RFormat::format_file).to eq(File.expand_path('../lib/rformat/formatters.yml', File.dirname(__FILE__))) end it "has an RFORMAT_ENV" do expect(RFormat::rformat_env_file).to eq(File.join(ENV['HOME'], ".rformat")) end it "has a version" do expect(RFormat::Version).to eq(File.read(File.join(RFormat::root_dir, 'VERSION'))) end it "has a copyright" do expect(RFormat::Copyright).to eq("Copyright (c) 2012 Dayton Nolan\n") end end