savon_spec 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,6 +26,11 @@ module Savon
26
26
  self
27
27
  end
28
28
 
29
+ def never
30
+ httpi_mock.never
31
+ self
32
+ end
33
+
29
34
  # Sets up HTTPI to return a given +response+.
30
35
  def returns(response = nil)
31
36
  http = { :code => 200, :headers => {}, :body => "" }
@@ -1,7 +1,7 @@
1
1
  module Savon
2
2
  module Spec
3
3
 
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
 
6
6
  end
7
7
  end
data/savon_spec.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.rubyforge_project = s.name
16
16
 
17
17
  s.add_dependency "savon", "~> 0.8.0"
18
- s.add_dependency "rspec", ">= 2.0.0"
18
+ s.add_dependency "rspec", ">= 2.4.0"
19
19
  s.add_dependency "mocha", ">= 0.9.8"
20
20
 
21
21
  s.add_development_dependency "httpclient", "~> 2.1.5"
@@ -47,7 +47,20 @@ describe Savon::Spec::Mock do
47
47
  Mocha::ExpectationError,
48
48
  /expected exactly once, not yet invoked: #<AnyInstance:Savon::SOAP::XML>.body=\(:id => 1\)/
49
49
  )
50
-
50
+
51
+ teardown_mocks_for_rspec
52
+ end
53
+ end
54
+
55
+ describe "#expects and #never" do
56
+ before { savon.expects(:noop).never }
57
+
58
+ it "should not expect Savon to send a given SOAP body" do
59
+ expect { client.request(:noop) }.to raise_error(
60
+ Mocha::ExpectationError,
61
+ /expected never, invoked once: HTTPI.post()/
62
+ )
63
+
51
64
  teardown_mocks_for_rspec
52
65
  end
53
66
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: savon_spec
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel Harrington
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-05 00:00:00 +01:00
18
+ date: 2011-02-08 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -42,12 +42,12 @@ dependencies:
42
42
  requirements:
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
- hash: 15
45
+ hash: 31
46
46
  segments:
47
47
  - 2
48
+ - 4
48
49
  - 0
49
- - 0
50
- version: 2.0.0
50
+ version: 2.4.0
51
51
  type: :runtime
52
52
  version_requirements: *id002
53
53
  - !ruby/object:Gem::Dependency
@@ -112,7 +112,6 @@ files:
112
112
  - Gemfile
113
113
  - README.md
114
114
  - Rakefile
115
- - autotest/discover.rb
116
115
  - lib/savon/spec.rb
117
116
  - lib/savon/spec/fixture.rb
118
117
  - lib/savon/spec/macros.rb
data/autotest/discover.rb DELETED
@@ -1 +0,0 @@
1
- Autotest.add_discovery { "rspec2" }