uencode 0.0.3 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,48 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe UEncode::Response do
4
- context "errors" do
5
- let(:response) { UEncode::Response.new :code => code, :message => "whatever" }
6
-
7
- context "when initialized with a 'BadRequest' code" do
8
- let(:code) { 'BadRequest' }
9
-
10
- it "raises a UEncode::Response::BadRequestError error containing the error message" do
11
- expect { response }.to raise_error(UEncode::Response::BadRequestError, "whatever")
12
- end
13
- end
14
-
15
- context "when initialized with a 'InvalidKey' code" do
16
- let(:code) { 'InvalidKey' }
17
-
18
- it "raises a UEncode::Response::InvalidKeyError containing the error message" do
19
- expect { response }.to raise_error(UEncode::Response::InvalidKeyError, "whatever")
20
- end
21
- end
22
-
23
- context "when initialized with a 'NotActive' code" do
24
- let(:code) { 'NotActive' }
25
-
26
- it "raises a UEncode::Response::NotActiveError containing the error message" do
27
- expect { response }.to raise_error(UEncode::Response::NotActiveError, "whatever")
28
- end
29
- end
30
-
31
- context "when initialized with a 'ServerError' code" do
32
- let(:code) { 'ServerError' }
33
-
34
- it "raises a UEncode::Response::ServerError containing the error message" do
35
- expect { response }.to raise_error(UEncode::Response::ServerError, "whatever")
36
- end
37
- end
38
-
39
- context "when initialized with an unknown code" do
40
- let(:code) { 'Ffffuuuuu' }
41
-
42
- it "raises a UEncode::Response::UnknownError containing the error code and the error message" do
43
- expect { response }.to raise_error(UEncode::Response::UnknownError, "Ffffuuuuu: whatever")
44
- end
45
- end
46
- end
47
-
48
- end
data/spec/spec_helper.rb DELETED
@@ -1,16 +0,0 @@
1
- require 'uencode'
2
- require 'rspec'
3
- require 'rspec/autorun'
4
- require "vcr"
5
-
6
- VCR.config do |c|
7
- library_dir = File.join(File.dirname(__FILE__), 'fixtures/')
8
- c.cassette_library_dir = library_dir
9
- c.stub_with :webmock
10
- c.allow_http_connections_when_no_cassette = false
11
- c.ignore_localhost = true
12
- end
13
-
14
- UEncode.configure do |c|
15
- c.customer_key = "1q2w3e4r5t"
16
- end
data/spec/uencode_spec.rb DELETED
@@ -1,14 +0,0 @@
1
- $LOAD_PATH.unshift(File.dirname(__FILE__))
2
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
-
4
- require 'spec_helper'
5
-
6
- describe UEncode do
7
- it "has a customer_key configuration parameter" do
8
- UEncode.configure do |c|
9
- c.customer_key = "1234567890"
10
- end
11
- UEncode.customer_key.should == "1234567890"
12
- end
13
- end
14
-