brightbox-rspec-rails-ext 1.6.2 → 1.6.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/CHANGELOG +1 -0
- data/lib/responses.rb +12 -6
- data/rspec-rails-ext.gemspec +4 -7
- metadata +5 -14
data/CHANGELOG
CHANGED
data/lib/responses.rb
CHANGED
|
@@ -42,17 +42,20 @@ module ResponseMatchers
|
|
|
42
42
|
|
|
43
43
|
# Does the given target object match the required status code?
|
|
44
44
|
def matches? target
|
|
45
|
-
target.status == @status_code
|
|
45
|
+
(@target_status = target.status) == @status_code
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
# What do we tell the user when it fails?
|
|
49
49
|
def failure_message
|
|
50
|
-
|
|
50
|
+
a = <<-EOF
|
|
51
|
+
expected the location header to be #{@status_code.inspect}
|
|
52
|
+
instead it was #{@target_status.inspect}
|
|
53
|
+
EOF
|
|
51
54
|
end
|
|
52
55
|
|
|
53
56
|
# What do we tell the user when it shouldn't fail but does
|
|
54
57
|
def negative_failure_message
|
|
55
|
-
"expected the response to be different to #{@status_code}"
|
|
58
|
+
"expected the response to be different to #{@status_code.inspect}"
|
|
56
59
|
end
|
|
57
60
|
end
|
|
58
61
|
|
|
@@ -64,17 +67,20 @@ module ResponseMatchers
|
|
|
64
67
|
|
|
65
68
|
# Does the given target object match the required location?
|
|
66
69
|
def matches? target
|
|
67
|
-
target.headers['Location'] == @url
|
|
70
|
+
(@target_url = target.headers['Location']) == @url
|
|
68
71
|
end
|
|
69
72
|
|
|
70
73
|
# What do we tell the user when it fails?
|
|
71
74
|
def failure_message
|
|
72
|
-
|
|
75
|
+
a = <<-EOF
|
|
76
|
+
expected the location header to be #{@target_url.inspect}
|
|
77
|
+
instead it was #{@url.inspect}
|
|
78
|
+
EOF
|
|
73
79
|
end
|
|
74
80
|
|
|
75
81
|
# What do we tell the user when it shouldn't fail but does
|
|
76
82
|
def negative_failure_message
|
|
77
|
-
"expected the location header to be different to #{@url}"
|
|
83
|
+
"expected the location header to be different to #{@url.inspect}"
|
|
78
84
|
end
|
|
79
85
|
end
|
|
80
86
|
|
data/rspec-rails-ext.gemspec
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = %q{rspec-rails-ext}
|
|
5
|
-
s.version = "1.6.
|
|
5
|
+
s.version = "1.6.3"
|
|
6
6
|
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
|
8
8
|
s.authors = ["Rahoul Baruah, Caius Durling"]
|
|
9
|
-
s.date = %q{2009-
|
|
9
|
+
s.date = %q{2009-04-22}
|
|
10
10
|
s.description = %q{Helpers for prettying up your RSpec-Rails specifications}
|
|
11
11
|
s.email = %q{support@brightbox.co.uk}
|
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG", "lib/controller_example_group.rb", "lib/mocks.rb", "lib/responses.rb", "lib/rspec_rails_extensions.rb", "README.rdoc"]
|
|
@@ -16,19 +16,16 @@ Gem::Specification.new do |s|
|
|
|
16
16
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Rspec-rails-ext", "--main", "README.rdoc"]
|
|
17
17
|
s.require_paths = ["lib"]
|
|
18
18
|
s.rubyforge_project = %q{rspec-rails-ext}
|
|
19
|
-
s.rubygems_version = %q{1.3.
|
|
19
|
+
s.rubygems_version = %q{1.3.2}
|
|
20
20
|
s.summary = %q{Helpers for prettying up your RSpec-Rails specifications}
|
|
21
21
|
|
|
22
22
|
if s.respond_to? :specification_version then
|
|
23
23
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
|
24
|
-
s.specification_version =
|
|
24
|
+
s.specification_version = 3
|
|
25
25
|
|
|
26
26
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
|
27
|
-
s.add_development_dependency(%q<echoe>, [">= 0"])
|
|
28
27
|
else
|
|
29
|
-
s.add_dependency(%q<echoe>, [">= 0"])
|
|
30
28
|
end
|
|
31
29
|
else
|
|
32
|
-
s.add_dependency(%q<echoe>, [">= 0"])
|
|
33
30
|
end
|
|
34
31
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: brightbox-rspec-rails-ext
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rahoul Baruah, Caius Durling
|
|
@@ -9,19 +9,10 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-
|
|
12
|
+
date: 2009-04-22 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
|
-
dependencies:
|
|
15
|
-
|
|
16
|
-
name: echoe
|
|
17
|
-
type: :development
|
|
18
|
-
version_requirement:
|
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
20
|
-
requirements:
|
|
21
|
-
- - ">="
|
|
22
|
-
- !ruby/object:Gem::Version
|
|
23
|
-
version: "0"
|
|
24
|
-
version:
|
|
14
|
+
dependencies: []
|
|
15
|
+
|
|
25
16
|
description: Helpers for prettying up your RSpec-Rails specifications
|
|
26
17
|
email: support@brightbox.co.uk
|
|
27
18
|
executables: []
|
|
@@ -75,7 +66,7 @@ requirements: []
|
|
|
75
66
|
rubyforge_project: rspec-rails-ext
|
|
76
67
|
rubygems_version: 1.2.0
|
|
77
68
|
signing_key:
|
|
78
|
-
specification_version:
|
|
69
|
+
specification_version: 3
|
|
79
70
|
summary: Helpers for prettying up your RSpec-Rails specifications
|
|
80
71
|
test_files: []
|
|
81
72
|
|