snarl-snp 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,22 +0,0 @@
1
- # -*- coding:utf-8 -*-
2
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
3
- require 'snarl/snp'
4
- require 'rubygems'
5
- require 'webmock'
6
-
7
- html = File.open(File.join(File.dirname(__FILE__), 'data', 'weather_yahoo_co_jp.html')){|f| f.read}
8
- WebMock.stub_request(:get, 'http://weather.yahoo.co.jp/weather/jp/1b/1400.html').to_return(:body => html)
9
-
10
- require 'open-uri'
11
- #p open('http://weather.yahoo.co.jp/weather/jp/1b/1400.html').read
12
- describe "Show weathercast of Sapporo, Japan" do
13
- it "do" do
14
- lambda{
15
- argv = ARGV.dup
16
- ARGV.clear # spec -fs -v yahoo_weather_spec.rb #=> ARGV[0] == '-fs'
17
- ARGV[0] = Snarl::SNP::Config.host
18
- load File.expand_path(File.dirname(__FILE__) + '../../../exsample/yahoo_weather.rb')
19
- ARGV.concat(argv)
20
- }.should_not raise_error
21
- end
22
- end