do let(:client) { Ramesh::Client.new } let(:tmpdir) { File.expand_path(File.join("..", "..", "tmp"), __FILE__) } let(:meshes_index_url) { "http://tokyo-ame.jwa.or.jp/scripts/mesh_index.js" } before do stub_request(:get, meshes_index_url) .to_return(status: 200, body: open(fixture_path("index.js"))) Dir.mkdir(tmpdir) end describe "#download_image" do let(:download_image) { client.download_image(minute, tmpdir, filename) } let(:minute) { 0 } let(:filename) { nil } before do image = double(write: true) allow_any_instance_of(Image).to receive(:download_image).and_return(image) allow_any_instance_of(Image).to receive(:composite_images).and_return(image) end context "when valid minute is specified" do let(:minute) do 30 end it "should return image name" do expect(download_image).to eq "201405091815.jpg" end end end end end
is running 18:12:09 - INFO - Guard is now watching at '/Users/fujita/src/ github.com/dtan4/terraforming' [1] guard(main)> 18:12:13 - INFO - Run all 18:12:13 - INFO - Running all specs I, [2015-05-27T18:12:14.570137 #53595] INFO -- : Not reporting to Code Climate because ENV['CODECLIMATE_REPO_TOKEN'] is not set. Terraforming::CLI dbpg without --tfstate should export DBParameterGroup tf with --tfstate ࣗಈςετɺUNVY &NBDT 5FSNJOBM௨