lmgtfy 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +0 -4
- data/lib/lmgtfy/version.rb +1 -1
- data/spec/lmgtfy/runner_spec.rb +6 -2
- metadata +1 -1
data/.travis.yml
CHANGED
data/lib/lmgtfy/version.rb
CHANGED
data/spec/lmgtfy/runner_spec.rb
CHANGED
@@ -3,14 +3,18 @@ require 'lmgtfy/runner'
|
|
3
3
|
|
4
4
|
describe Lmgtfy::Runner do
|
5
5
|
|
6
|
+
before do
|
7
|
+
@query = URI.encode_www_form([['q', ARGV.join(' ')]])
|
8
|
+
end
|
9
|
+
|
6
10
|
it "accepts search query from the user" do
|
7
11
|
runner = Lmgtfy::Runner.new
|
8
|
-
runner.query.should eq
|
12
|
+
runner.query.should eq @query
|
9
13
|
end
|
10
14
|
|
11
15
|
it "generates correct url" do
|
12
16
|
runner = Lmgtfy::Runner.new
|
13
|
-
runner.generate_lmgtfy_url.should eq "http://lmgtfy.com
|
17
|
+
runner.generate_lmgtfy_url.should eq "http://lmgtfy.com/?#{@query}"
|
14
18
|
end
|
15
19
|
|
16
20
|
end
|