jsend-rails 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f039a5b70d591280c775d859bf004eca956d24d
4
- data.tar.gz: dd0b24a1bbafdd970a10375b82bfe43863e71361
3
+ metadata.gz: a3f3c4c95b7204dc1733fc3fa6ba21f0bd022346
4
+ data.tar.gz: 5e2590483389c6a2b4ed057c270eafadf8a99c11
5
5
  SHA512:
6
- metadata.gz: 145f27023f29b825aaff1ea41d7583dc01bc079ad2aad433f42b4ba435260e7e0301b442dae717234c5cc7517d3f543ba33571b227ba122d3b9f3dc4d36d6dc3
7
- data.tar.gz: 132c0ae0dbb292172a80d9159002f4c2db0b10256a5a67f46b3a05526e14b48abcec53875dea957ee7d6a97ec67551e6e351b20a553120654d3d018423ae802e
6
+ metadata.gz: 84a725e414b24eb2bd34c6484976307e642e5fe5169dade029fee007ede7f0da200807c80385379d379ac9d5df0b86d183c748cde4fd3016788de81b855d0bb6
7
+ data.tar.gz: c1c92dd23a7fe5628db70254af843b6045a4aefb4189dc3bfa4e812e98d0331348ab050d6b957a3e2ba548febc80bf517806a01d97339547f1aac846b31dfd4d
@@ -9,48 +9,52 @@ module JSend
9
9
  match do |response|
10
10
  response.content_type =~ /^application\/json/
11
11
  end
12
- failure_message_for_should do |response|
12
+ failure_message do |response|
13
13
  "Response should have application/json content type"
14
14
  end
15
- failure_message_for_should_not do |response|
15
+ failure_message_when_negated do |response|
16
16
  "Response should not have application/json content type"
17
17
  end
18
+ alias negative_failure_message failure_message_when_negated
18
19
  end
19
20
 
20
21
  RSpec::Matchers.define :be_jsend_success do
21
22
  match do |response|
22
- response.json['status'].should == 'success'
23
+ response.json['status'] == 'success'
23
24
  end
24
- failure_message_for_should do |response|
25
+ failure_message do |response|
25
26
  "Response should be JSend success"
26
27
  end
27
- failure_message_for_should_not do |response|
28
+ failure_message_when_negated do |response|
28
29
  "Response should not be JSend success"
29
30
  end
31
+ alias negative_failure_message failure_message_when_negated
30
32
  end
31
33
 
32
34
  RSpec::Matchers.define :be_jsend_failure do
33
35
  match do |response|
34
- response.json['status'].should == 'fail'
36
+ response.json['status'] == 'fail'
35
37
  end
36
- failure_message_for_should do |response|
38
+ failure_message do |response|
37
39
  "Response should be JSend failure"
38
40
  end
39
- failure_message_for_should_not do |response|
41
+ failure_message_when_negated do |response|
40
42
  "Response should not be JSend failure"
41
43
  end
44
+ alias negative_failure_message failure_message_when_negated
42
45
  end
43
46
 
44
47
  RSpec::Matchers.define :be_jsend_error do
45
48
  match do |response|
46
- response.json['status'].should == 'error'
49
+ response.json['status'] == 'error'
47
50
  end
48
- failure_message_for_should do |response|
51
+ failure_message do |response|
49
52
  "Response should be JSend error"
50
53
  end
51
- failure_message_for_should_not do |response|
54
+ failure_message_when_negated do |response|
52
55
  "Response should not be JSend error"
53
56
  end
57
+ alias negative_failure_message failure_message_when_negated
54
58
  end
55
59
  end
56
60
  end
@@ -1,5 +1,5 @@
1
1
  module JSend
2
2
  module Rails
3
- VERSION = "1.2.1"
3
+ VERSION = "1.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsend-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Moseley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-02 00:00:00.000000000 Z
11
+ date: 2014-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails