Sha256: e0906b85be87ac09b858650fdb3f9c4f4a87886bace372b0f944bf6eb590a7b7
Contents?: true
Size: 451 Bytes
Versions: 1
Compression:
Stored size: 451 Bytes
Contents
require 'lunartic' require 'yaml' FIXTURES = YAML.load_file("#{File.dirname __FILE__}/fixtures/moon.yml").map do |obj| sym_hash = {} obj.each_pair do |k,v| sym_hash[k.to_sym] = v end sym_hash end def test_method_against_fixtures(method) FIXTURES.each do |known| date = Date.new(known[:date_year], known[:date_month], known[:date_day]) moon = Lunartic::Moon.new date expect(moon.send(method)).to eql known[method] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lunartic-0.2.1 | spec/spec_helper.rb |